Apply different rules to different folders

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

Moderator: Mr_Noodle

I have this structure

Root Folder (monitored)
- Folder A
- Folder B
- Folder C

All of these 3 folders have the exact same type of content: audio, so I can't use different rules based on the type of file, but I would like to create a rule for items in Folder A, different from the rules for Folder B and rule for Folder C.
Other than adding the 3 folders individually to Hazel (in this case I'm using 3, but it could be 10 or 20 and that would be too much for the sidebar), is there a way to achieve this? Something like "if the parent folder's name is Folder A, apply these rules"? Then it would move on to Folder B, then Folder C
Danny Wyatt
 
Posts: 25
Joined: Wed Mar 23, 2022 7:39 am

If each folder is going to have different sets of rules, it probably is better to have each folder monitored separately. I think it would only make things more difficult to manage having it all crammed into one ruleset.

If you insist on doing it this way, you can use a nested condition to match against the enclosing folder. Check the manual for more details.
Mr_Noodle
Site Admin
 
Posts: 11235
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:If each folder is going to have different sets of rules, it probably is better to have each folder monitored separately. I think it would only make things more difficult to manage having it all crammed into one ruleset.

If you insist on doing it this way, you can use a nested condition to match against the enclosing folder. Check the manual for more details.


In the case of just a few folders, maybe this is not an issue, but I will explore the nested conditions and see what can be done.
Thank you
Danny Wyatt
 
Posts: 25
Joined: Wed Mar 23, 2022 7:39 am


Return to Support

cron