Tagging Subfolders

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

Moderator: Mr_Noodle

Tagging Subfolders Thu Aug 04, 2016 6:09 am • by Jeff
Hi there,

I am trying to set up a rule to do the following:

Give a purple tag to all the files and subfolders, within the watched folder, that have been modified within the last three months.

So far I set up the following for the watched folder:

Rule 1 (ad purple tag to folders modified in the last 3 months)
If all of the following conditions ar met:
- Kind is Folder
- Date Last Modified is in the last 3 months
Do the following to the matched file or folder:
Add tags Purple

Rule 2 (Hazel into subfolders)
If all of the following conditions ar met:
- Kind is Folder
Do the following to the matched file or folder:
- Run rules on folder contents

Rule 3 (File modified within last 3 months: tag purple)
If all of the following conditions ar met:
- Date Last Modified is in the last 3 months
Do the following to the matched file or folder:
- Add tags Purple

Rule 4 (File not modified within last 3 months: remove tag purple)
If all of the following conditions ar met:
- Date Last Modified is not in the last 3 months
Do the following to the matched file or folder:
- Remove tags Purple

The following works fine:
- All files within the watched folders that have been modified within the last 3 months are tagged purple
- The first level subfolders all get tagged too if they have been modified within the last 3 months

However:
- The second level or more subfolders don't get tagged purple, although they have been modified within the last 3 months

I would like to apply the tagging to all the folders and subfolders within the watched folder. How do I do that?
Jeff
 
Posts: 4
Joined: Thu Aug 04, 2016 5:46 am

Re: Tagging Subfolders Thu Aug 04, 2016 11:46 am • by Mr_Noodle
The problem is that Rule 1 is overriding Rule 2. If a folder matches rule 1, then it never matches rule 2 so that Hazel can go into it. Also, rule 1 and rule 3 are redundant.

To fix thing and clean it up a bit, get rid of rule 3. Put rule 2 at the top and add a "Continue" action to it. That way even if a folder matches that rule, Hazel will go into it but evaluation will continue and it can match the other rules to add/remove the purple tag.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Tagging Subfolders Thu Aug 04, 2016 6:15 pm • by Jeff
Nice Try Mr. Noodle. Too bad it didn't work. Thanks anyway...
Jeff
 
Posts: 4
Joined: Thu Aug 04, 2016 5:46 am

Re: Tagging Subfolders Fri Aug 05, 2016 4:02 am • by Jeff
So far I set up the following for the watched folder:

Now the watched folder is submitted by:

Rule 1 (Hazel into subfolders)
If all of the following conditions ar met:
- Kind is Folder
Do the following to the matched file or folder:
- Run rules on folder contents
- Continue matching rules

Rule 2 (ad purple tag to folders modified in the last 3 months)
If all of the following conditions ar met:
- Kind is Folder
- Date Last Modified is in the last 3 months
Do the following to the matched file or folder:
- Add tags Purple

Rule 3 (File not modified within last 3 months: remove tag purple)
If all of the following conditions ar met:
- Date Last Modified is not in the last 3 months
Do the following to the matched file or folder:
- Remove tags Purple

However the deeper subfolders still don't get their purple tag.
Jeff
 
Posts: 4
Joined: Thu Aug 04, 2016 5:46 am

Re: Tagging Subfolders Fri Aug 05, 2016 4:44 am • by Jeff
Sorry about that-one:

It all works a a charm :).

Keep the good work going Mr. Noodle.

Cheers,
Jeff
 
Posts: 4
Joined: Thu Aug 04, 2016 5:46 am


Return to Support