Need advice with two different rules using the same file

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I am new to this but have searched around and haven't been able to construct a workaround. I realize what I'm is not exactly supposed to work, but I have seen enough creativity here to not doubt that something can be made to work.

I currently scan everything into my computer with a Fujitsu Scansnap S1500. Everything gets dumped into a folder titled "SCAN TO HERE" with a filename of the exact time the document was scanned (2013_03_03_12_00_00). From there I have been manually organizing everything into separate logical folders ("Utilites", "Receipts", "Insurance", etc.) with more detailed subfolders. As I am beginning to use Hazel I would like to also create a backup just in case I mess up a rule and something gets tucked away and renamed somewhere it shouldn't be. This seemed simple enough to begin with. I created a "Backup" subfolder in "SCAN TO HERE" and wrote a Hazel rule where any .pdf file arriving in "SCAN TO HERE" was copied to the "Backup" folder. Worked great. Then I noticed my other rules weren't working like they were before the "Backup" rule was included. For some reason the backup rule takes precedent over the other rules. If I disable the backup rule the others work again.

All I've been able to come up with is to add the backup rule to each rule I write that sorts files out of the "SCAN TO HERE" folder to a new destination, which would work, but I still wouldn't be backing up the other files arriving that are NOT sorted by Hazel and moved manually. As helpful as Hazel is, there is still some work involved sorting all the bizarre stuff I seem to find to scan!

Thanks for the help!
cdogg44
 
Posts: 3
Joined: Sun Mar 03, 2013 11:59 pm

Hazel rules execute sequentially. You need to add a flag for your backed up rules so that Hazel knows the file has already been backed up. For instance:

Rule 1: Back it up...

Code: Select all
if (all) of the following conditions are met for (the file or folder being processed):
     color label is not blue
     kind is pdf

Do the following to the matched file or folder:
     copy file to /Backup
     set color label blue


Rule 2: Sort it out...

Code: Select all
if (all) of the following conditions are met for (the file or folder being processed):
     color label is blue
     . . .

Do the following to the matched file or folder:
     sort
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado


Return to Support

cron