Page 1 of 1

Please help me understand how to make recursive rules

PostPosted: Wed Sep 21, 2016 11:29 am
by nikivi
Mr Noodle, or perhaps someone else familiar with hazel, I really want to understand how I can make rules that apply not just on the folder watched, but on its subfolders and for it to work very well.

I have two use cases for it, one is to lowercase all files recursively in a folder I choose. The other is to add some prefix to a name for all the files in the folder watched and the subfolders.

Here is one such rule that one would assume would work, but it doesn't : http://i.imgur.com/iUHVlfz.png

Nor is the recursive rename works : http://i.imgur.com/v8F77Jd.png

I read through the entirety of the forum and I still can't come up with a solution. Please help me make this, once I understand this, it will make hazel really powerful because I don't have to watch for every single folder to apply my rules.

Thank you.

Re: Please help me understand how to make recursive rules

PostPosted: Thu Sep 22, 2016 12:40 pm
by Mr_Noodle
Please read this article: https://www.noodlesoft.com/kb/going-into-subfolders/

Read it again even if you already have. Your rule looks like the rule with a big red X through it. Don't do that. Do not try to merge the logic all into one rule. Once you get past that, you should have an easier time of it.

Re: Please help me understand how to make recursive rules

PostPosted: Fri Sep 23, 2016 11:38 am
by nikivi
Oh wow, this was easy. Thank you.

So if I then want to apply rules not recursively, I need to do this? http://i.imgur.com/7mPKXdR.png

Re: Please help me understand how to make recursive rules

PostPosted: Fri Sep 23, 2016 11:59 am
by nikivi
Mr_Noodle wrote:Please read this article: https://www.noodlesoft.com/kb/going-into-subfolders/

Read it again even if you already have. Your rule looks like the rule with a big red X through it. Don't do that. Do not try to merge the logic all into one rule. Once you get past that, you should have an easier time of it.



Also not sure why, but this does not work. http://i.imgur.com/OPio2Cq.png

It should lowercase all files in the subfolders and the main folder.

Re: Please help me understand how to make recursive rules

PostPosted: Fri Sep 23, 2016 1:36 pm
by Mr_Noodle
You need the subfolder rule in there. It is a separate rule but it needs to be there otherwise there's nothing to tell Hazel to go into subfolders when it encounters one.

Re: Please help me understand how to make recursive rules

PostPosted: Fri Sep 23, 2016 3:37 pm
by nikivi
Mr_Noodle wrote:You need the subfolder rule in there. It is a separate rule but it needs to be there otherwise there's nothing to tell Hazel to go into subfolders when it encounters one.


I have it : http://i.imgur.com/qsVMnds.png

My recursive prefixing works. Lowercasing and hiding extensions doesn't though.

Maybe ordering of rules matters?

Re: Please help me understand how to make recursive rules

PostPosted: Mon Sep 26, 2016 3:42 pm
by Mr_Noodle
Yes, rule ordering is very important. I see you already posted in the support section so I've already replied to your issue there.