Colour coding folder based on files inside?

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

Colour coding folder based on files inside? Thu Nov 27, 2008 9:38 am • by beertje
I've a small set of folders on my desktop, Inbox, Outbox, Pending and so on, and I have checks in place to notify me and colour code files in these folders if they stay there for too long.

All good and well as long as I'm at the computer when the notification pops up, or go inside the folders. I just thought that instead of using Growl notifications, I should colour the folders if there are any coloured files inside them. That way it's more in my face.

So, in short:
If a folder on the desktop contains a red file, colour the folder red.
If a folder on the desktop contains a yellow file, colour the folder yellow.

... in that order. Is this possible?

Thanks!
-Björn
beertje
 
Posts: 3
Joined: Mon Aug 27, 2007 11:11 am

Check out my post in the thread here: viewtopic.php?f=3&t=135

Using Applescript, you can instruct Hazel to re-target to a different file. The example above will have Hazel switch the file being operated on to the parent folder. Any actions after the one that runs that script will operate on the parent folder.

So your rule would look something like:

If color is red,
- run the above script
- set color to red (the above script would have changed the file to its parent so this action operates on the parent).

Try that out and let me know if that works for you.
Mr_Noodle
Site Admin
 
Posts: 8571
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Tips & Tricks - DO NOT POST QUESTIONS