Page 1 of 1

Trying to delete files from two levels down

PostPosted: Tue Jan 15, 2013 3:55 pm
by troyg
Hi,

I use Hazel on my work computer, and would like to delete chats I have with non-work friends. There are two folder levels involved here. The top level folder is called "Archive", and under that there is a new folder created every day.

I've created two rules on the "Archive" folder.

The first is this: If ANY of the following conditions are met for THE FILE OR FOLDER BEING MATCHED, KIND IS FOLDER than "Run rules on folder contents"

The second rule is intended to delete messages from specific senders. It reads: if ANY ... "any of its sub-files or folders"
"Instant Message Address" "contain" "IM address 1"
"Instant Message Address" "contain" "IM address 2"
"Instant Message Address" "contain" "IM address 3"

Do the following: Move to folder trash.

It does not work.

When I hit the eyeball button, it shows that the first rule matched all the date subfolder, but the second rule does not match anything, even though when I click on one of the target files and look at the properties, the IM address matches one of the ones in my rule.

Re: Trying to delete files from two levels down

PostPosted: Wed Jan 16, 2013 2:24 pm
by Mr_Noodle
Keep in mind that if you use "contains" with a list (at least on my system, it's "Instant Message Addresses"), you have to specify a whole entry. Meaning if you have a list like Apple, Bacon, Caramel, then you have to do "contains Bacon". Partial matches like "contains bac" will not work in this case.

Re: Trying to delete files from two levels down

PostPosted: Thu Jan 17, 2013 12:43 pm
by troyg
Thanks! That worked. I also had to change the condition from "any of its sub-files or folders" to "the file or folder being matched".