Page 1 of 1

Help with moving files based on creation date to directory.

PostPosted: Sun Nov 13, 2011 6:53 pm
by lobstah
I think I posted this initially in the wrong forum, so re-posting here.

Thank you-

*****
So I finally got smart and purchased Hazel. Unfortunately, due to years of painful mis-management of picture workflow, my pictures are not in a single location. What I'd like to do is set up a rule that will automatically parse a directory (and it's subdirectories) on my hard drive and move the pictures based on their creation date to a pre-defined folder.

For example, let's say I have picture IMG_4460.CR2 and it was created on 11/5/11

I would set up a rule that says:

if EXTENSION is CR2

DO THE FOLLOWING:

[here is where I get confused]

I want it to move the file to a specific directory based on creation date.

If created on 11/5/11 it would move the file to 2011 -> 11-November
If created on 6/5/09 it would move the file to 2009 -> 06-June

Is this possible? Can someone please help me with the later part of the rule? THANK YOU!

Re: Help with moving files based on creation date to directo

PostPosted: Mon Nov 14, 2011 11:48 am
by Mr_Noodle
If you use the Sort into Subfolder rule, you'll see that it takes a pattern. You can use the date created in the pattern. After dragging Date Created into the pattern, you'll see that you can click on it to edit the date format. From there, you can format the date however you want.

As for going through subdirectories, check the sticky article in this forum.

Re: Help with moving files based on creation date to directo

PostPosted: Mon Nov 14, 2011 12:17 pm
by lobstah
Thank you! I just needed that little bit of guidance.

Great program!

Re: Help with moving files based on creation date to directo

PostPosted: Mon Nov 14, 2011 5:45 pm
by lobstah
Making progress! Thank you! Here's a question though:

Let's say I drag a directory (with subdirectories) in to the folder being monitored. The script right now does nothing, because the files are in the subdirectories. Is there a way to get the script to recurse every directory and subdirectory?

For example, if I have a directory structure of:

pictures -> camera -> joe
-> martha

Could I drag the pictures directory and have it go through and recurse all the subdirectories and apply the rules as well?

Thanks!

Re: Help with moving files based on creation date to directo

PostPosted: Mon Nov 14, 2011 5:46 pm
by Mr_Noodle
Did you check the sticky article at the top of this forum on subfolders? I believe that should answer your question.