One question about the subfolders rules

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

Moderator: Mr_Noodle

One question about the subfolders rules Fri Nov 29, 2013 4:21 pm • by ptitloup926
Hi there,

I downloaded the subfolders rules so Hazel can go through all the sub folders of one big folder to apply the rules I want.

It works perfectly ( awesome software btw !! )

Only issue I came to ... kinda tricky actually , I don't know if this rule is possible to do.

So basically, I've set up the following rules ( by adding 3 rules separately) :

1)Going into subfolders

2) Setting a green color label to each file with a .cpr file extension ( Cubase project file )

3) Moving each .bak files into a subfolder ( created in the same folder as the .bak is located ) with the extension ( /bak folder )

1 and 2 works perfectly. The problem is with rule number 3 : as Hazel is periodically going into each subfolders of the whole big folder, when he finds a .Bak file into a folder, he moves it to a sub folder. Problem is, he indefinitely goes into each /Bak folder to find the .Bak files, then keep making a /bak folder...... into the /Bak folder !!! Kinda crazy actually... If I dont stop the rules quickly, I end up having 10 bak folders into one /Bak folder .. like : /work project/project 1/bak/bak/Bak/bak/bak/bak/bak/bak/bak/bak....

Hazel is acting totally normally because I asked it to go into each subfolders, then apply the rules.

I dont know what to do to avoid that "infinite subfolders making " problem, if I dont
do the "go into subfolders" rules, Hazel will never find these .bak files to move them into a subfolder. But If i tell him to go into subfolders, then he will do what I described above.

Don't hesitate to ask me if i'm unclear.

ptitloup
ptitloup926
 
Posts: 1
Joined: Fri Nov 29, 2013 4:15 pm

Re: One question about the subfolders rules Mon Dec 02, 2013 2:40 pm • by Mr_Noodle
You'll need to figure out how to stop the loop in this case. Is there a way to know that the .bak file is in its final place? If so, you should incorporate that into the conditions. For instance, if you are literally putting the .bak files into a folder named "Bak", you can filter on that by doing:

If Extension is bak
If (all) are met for "enclosing folder"
If Name is Bak

To get the nested condition, hold down the option key while clicking the + button to create a new condition.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support