Changing folder based on contents?

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

Moderator: Mr_Noodle

Changing folder based on contents? Sun Jan 10, 2016 7:06 am • by atacht2015
Hello all,

I'm just getting started with Hazel and going paperless, using many techniques from David Sparks. So far, Hazel is proving to be AWESOME. I've got 1 sticky question and I don't know if Hazel can help or not.

In my "process" folder (where all my scans and downloaded PDFs go) I have a rule that marks files red if they've been in the folder for more than 10 days. So far, great. However, what I'd like to also do is mark the folder itself red when there are files in it more than 10 days old. That way I don't even have to open the folder to see if there are old files in it.

I can/will manually remove the red flag after I deal with the files, but flagging old stuff would be most helpful for me.

Any pointers?

Thanks!
atacht2015
 
Posts: 2
Joined: Sun Jan 10, 2016 7:05 am

Re: Changing folder based on contents? Mon Jan 11, 2016 11:30 am • by Mr_Noodle
You'll need to have Hazel monitor the folder that contains the folder you want to color red. Now the next part is tricky as you need to deal with sub-files in two different ways. You'll need to:

- Mark the files as you did before, but now, well, they are in a subfolder.
- Mark the folder based on the files in it.

For the first one, read the sticky article about going into subfolders. You need to add a rule like the one there in addition to the one you have to mark the old files red.

For the second one, hold down option while clicking the + button to create a new condition. That creates a nested condition. There you can select the "any of its sub-files..." target. Any conditions under that nested condition will now pertain to the files within the folder, while the rule as a whole still applies to the folder itself. Also, make sure that this rule appears before the one to go into subfolders, as that one will end up taking precedence otherwise.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support