Page 1 of 1

Colour coding folder based on files inside?

PostPosted: 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

Re: Colour coding folder based on files inside?

PostPosted: Wed Dec 03, 2008 12:38 pm
by Mr_Noodle
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.