How can I use Hazel to trash folders?

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

Moderator: Mr_Noodle

How can I use Hazel to trash folders? Tue Mar 02, 2010 3:07 pm • by silvine
I'm trying to set up a Hazel rule to trash old files and folders (ie more than 2 days old). It's deleting the files no problem but leaving the folders.

Any ideas?
silvine
 
Posts: 17
Joined: Mon Feb 08, 2010 3:30 pm

Re: How can I use Hazel to trash folders? Tue Mar 02, 2010 4:35 pm • by Mr_Noodle
First off, please do not post random questions to the tips and tricks. As indicated by the top article there, only post if you have tips & tricks to share.

Hazel, by default, treats files and folders the same. You suspect there's something about your rules in particular that is preventing this so you may want to post those.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: How can I use Hazel to trash folders? Tue Mar 02, 2010 6:07 pm • by silvine
Apologies, mis-read the forum I was in.

Here are the rules on my 'Downloads' folder :

1 If kind is folder, run rules on folder contents.

2 If date added is not in the last 2 days and kind is folder move folder to trash.

I've also set up a series of different rules for the 'Downloads' folder which move music files, movie files and pictures to other folders on my mac.

Basically everything is working as it should be except Hazel is not moving old folders in 'Downloads' to the trash. For example, I downloaded an episode of family guy to 'Downloads/family guy'. Hazel moved family s08e01.avi to my movies folder but it did not delete 'Downloads/family guy'. In effect I still have to delete the empty folders from 'Downloads' manually.

I got the idea from here: http://lifehacker.com/320951/set-up-a-s ... with-hazel
silvine
 
Posts: 17
Joined: Mon Feb 08, 2010 3:30 pm

Re: How can I use Hazel to trash folders? Wed Mar 03, 2010 1:28 pm • by Mr_Noodle
I believe the problem here is the ordering of the rules. Rule 2 never matches anything because all folders end up matched against rule 1. Try reversing the order of those two. Also, the preview function is useful for checking the rule logic.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: How can I use Hazel to trash folders? Wed Mar 03, 2010 1:36 pm • by silvine
Seems to work no. Didn't realise order was important. Cheers.
silvine
 
Posts: 17
Joined: Mon Feb 08, 2010 3:30 pm


Return to Support