Page 1 of 1

Scheduled moving of files with certain labels

PostPosted: Wed Jan 16, 2013 11:55 am
by pimes
I can't seem to get Hazel to move the file I want her to move. I have two folders: Folder 1 and Folder 2. At a certain time each day I want to move all files contained in Folder 1 that have a red label to Folder 2. Duplicate file names should be renamed.

I set Folder 1 as my folder in Hazel.
Image

And here are my rules.
Image

When the scheduled time rolls around, nothing seems to happen. Hazel is running. Any suggestions?

Re: Scheduled moving of files with certain labels

PostPosted: Wed Jan 16, 2013 12:35 pm
by JacobRyan
Some more testing needs to be done for this. I keep encountering issues where it wants to target the files no matter the time. The rule will work initially but then for some reason it errors for me and wants to target the file no matter what time it is.

Re: Scheduled moving of files with certain labels

PostPosted: Wed Jan 16, 2013 2:26 pm
by Mr_Noodle
Do not use "any subfiles" for this. That matches the folder containing the file, not the files themselves. See the sticky article at the top of the forum on how to do this properly.

Re: Scheduled moving of files with certain labels

PostPosted: Wed Jan 16, 2013 3:12 pm
by pimes
JacobRyan, I think I've found a solution to the problem of Hazel trying to move files outside of the specified time. Rather than setting a specific time such as 2:30, I set two rules. In the first rule, I tell it to only run after 2:30 and the second says to only run before 2:31. The seems to prevent any subsequent files from being moved over automatically. Of course, this assumes you will not be adding any additional files in that 1 minute span of time. In my case, I am running these rules in the middle of the night so no other files should be added to the folder. Here's what my recipe looks like now:

Image

Mr_Noodle, I now have the rule set to run when conditions are met for "the file or folder being matched" and it seems to be moving the files I have targeted, which takes care of my original issue. The new problem is that if I set the time to run the way I did in my original screenshot, it will move the targeted files at the specified time, but it will also move any files I add to that folder after the specified time. The solution I mention to JacobRyan in this post seems to work for me, but it does not seem to work properly when I make a condition that Current Time IS a specific time. Any suggestions?

Re: Scheduled moving of files with certain labels

PostPosted: Wed Jan 16, 2013 5:00 pm
by JacobRyan
The way you set up the rule with the before and after times was the only thing I thought would work too, which is unfortunate. Initially the rule would work as specified when using Current Time IS, but after I moved the files back to Folder 1 for more testing or added new files it just ran the rule regardless of the time.

Re: Scheduled moving of files with certain labels

PostPosted: Thu Jan 17, 2013 3:13 pm
by Mr_Noodle
Note that "current time" has a fudge factor of a few minutes afterwards so if you added those files soon after that time, they would end up matching.