Page 1 of 1

Rules running order

PostPosted: Thu Feb 05, 2015 1:50 am
by ddougan
If I understand the operation of Hazel, the rules run on in the order they are in the Rules list - is that correct?

If so, I seem to have found an issue - in my Downloads folder, I have some subfolders, one of which I wanted actioned by several of my rules.

I read your fixed post and downloaded the "Go into subfolders" rule. I've moved this to the bottom of my rules list, then below it, moved the three rules I want to be affected by it.

However, one of the rules (at least one, that is) in the list above the subfolders rule is being executed.

Am I missing something fundamental here?


Thanks,

Des

Re: Rules running order

PostPosted: Thu Feb 05, 2015 12:53 pm
by Mr_Noodle
Only one rule (the first one to match) will be run. If you need a file to match and run multiple rules, you need to use the "Continue" action to tell Hazel to do so.

Re: Rules running order

PostPosted: Thu Feb 05, 2015 4:27 pm
by ddougan
OK, thanks for that, Paul.

However, I think you missed my main point - a rule on the list above the subfolder rule is being run, which should not be the case if I understand you correctly.



Regards,

Des

Re: Rules running order

PostPosted: Fri Feb 06, 2015 5:00 pm
by Mr_Noodle
Can you elaborate then? The first rule in the list to match is the one that gets run so it makes sense that a rule before the one you expect may get run instead.

Re: Rules running order

PostPosted: Sun Feb 08, 2015 12:25 am
by ddougan
Sorry if I wasn’t clear; I have a rule listed above the subfolder rule that was designed to move files into a subfolder of Downloads after 28 days. When the subfolder rule I downloaded is active, the "Old Files" rule is being affected, even though it's above the subfolders one.

This is a log snippet:

Code: Select all
2015-02-04 21:38:14.451 hazelworker[81654] [File Event] File moved into subfolder: /Users/Des/Downloads/Playlist Export/Old Downloads/Young, Neil.xml sorted from folder /Users/Des/Downloads/Playlist Export to subfolder Old Downloads.


As you can see, it's executed on a subfolder of Downloads (Playlist Export) and has run the Old Files rule, created a folder called Old Downloads inside the Playlist Export folder and migrated playlists into it.

Old Files content is:

Code: Select all
If all conditions are met:

Date added is not in last 4 weeks
Kind is not Folder
Kind is not PDF

Action:

Sort into subfolder with pattern: Old Downloads


The Go into subfolders rule is as I downloaded it. It is two rules below the one above, and has below it the DMG rule which archives the disk images to a folder on my NAS.



Thanks,

Des

Re: Rules running order

PostPosted: Mon Feb 09, 2015 3:01 pm
by Mr_Noodle
I'm not sure what the exact desired result is here but one problem you have to fix is that if you sort something into a subfolder, with the subfolder rule, Hazel will go into that subfolder and possibly sort that file again. You need to add conditions to prevent that or get rid of the subfolder rule as it's still not clear to me that you need it in this instance.