Page 1 of 1

How to apply rules on folders which have specific content.

PostPosted: Tue Dec 20, 2016 3:06 am
by patricorgi
I have read the topic of How to get Hazel to go into subfolders:http://www.noodlesoft.com/forums/viewtopic.php?f=4&t=470
But this topic isn't what I want.
I need to first match the folder's content with the rules and then apply action to that folder(not the content).
For example, if I have a folder, named "TV Series of X", which contains the .mkv files(or other kind of movie file), then I need Hazel to move the whole folder into my Movies folder.
For another example, if I have a folder, named "TV Series of X with subfolders", which contains the subfolder "Season 1", containing the episodes(.mkv files) of season 1, the subfolder "Season 2", containing the episodes(.mkv files) of season 2, and so on ...
I could go on but I think I have made my point --> I need to match the rules with the content of the folder, but do not do anything with the content. For those folders whose content match the rules, let Hazel apply actions to those folders.

Maybe this task it's not hard, but for the reason that English is not my mother tongue, I could not figure it out on my own. Could anyone help?

Re: How to apply rules on folders which have specific conten

PostPosted: Tue Dec 20, 2016 1:24 pm
by Mr_Noodle
Check out this article: https://www.noodlesoft.com/kb/how-to-cr ... onditions/

With a nested condition, you can specify that the conditions under it apply to sub-files. The rule as a whole will still match and act on the folder though.

Re: How to apply rules on folders which have specific conten

PostPosted: Tue Dec 20, 2016 11:01 pm
by patricorgi
Mr_Noodle wrote:Check out this article: https://www.noodlesoft.com/kb/how-to-cr ... onditions/

With a nested condition, you can specify that the conditions under it apply to sub-files. The rule as a whole will still match and act on the folder though.


Thanks a lot! You just opened a new world for me! :D

Re: How to apply rules on folders which have specific conten

PostPosted: Tue Jan 10, 2017 9:42 pm
by leefur
This is fantastic. How would we have the rule act only on the immediate folder? That is, as Hazel traverses this whole parent folder, I can imagine that it'll run on the parent if any subfolder matches the nested conditions, right? Since it's if the conditions are met for "any of its subfiles or subfolders"? Or will the match only be on the immediate parent folder of the new/changed files?

Re: How to apply rules on folders which have specific conten

PostPosted: Wed Jan 11, 2017 3:00 pm
by Mr_Noodle
Not sure what you mean by immediate and parent in this case. Can you clarify with an example?