Changing File Names In Subfolder-Yes I've Read The Sticky

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

Moderator: Mr_Noodle

I accidentally posted this in tips & tricks first so I am no posting it in support...

Hi there. I've tried to understand the subfolder thing and just can't get it working. I downloaded the rule from the sticky and did a test trying to add a color label to a file within a subfolder and it colored the subfolder. Where did I go wrong? The only modification I made to the downloaded rule was to add the color label rule.

What I'm actually trying to do is:
In Folder SHOW > In all subfolders regardless of name & for all files in SHOW and not in a subfolder > In subfolder A: File Example Name.pdf, change "Example Name" in the file name to "EN"

If I move the File into the top SHOW folder, the rule works. But I can not get it to work in any subfolders.

Also, and this may be a separate question, what is the different between the condition "any of its sub-files and folder" vs. the condition "the file or folder being matched" and then making the first action "run rules on folder contents."
abbimj
 
Posts: 5
Joined: Fri Mar 30, 2012 12:46 pm

Do not modify the rule. The article mentions not combining the rules. The rule from that article is separate from whatever logic you are using to process the files within the subfolders. Go back with that in mind and you should have it working (or at least something closer to what you want).

As for your question, there are two situations:

1. Have Hazel go into subfolders and process the items in it.
2. Hazel Hazel process a folder based on the files in it.

"Run rules on folder contents" handles #1. "Any of its sub-files, etc" handles #2.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thank you! I do always forget that multiple rules need to be made, "do the following" is not consecutive within one rule. So now folder rule 1 is "run on file contents" and rule 2 is "replace name." Works like a charm.
abbimj
 
Posts: 5
Joined: Fri Mar 30, 2012 12:46 pm


Return to Support