Delete subfolder _notes

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

Moderator: Mr_Noodle

Delete subfolder _notes Wed Dec 08, 2010 2:23 pm • by ryansebiz
I'm trying to setup a rule that deletes all subfolders named "_notes". I've read several threads on the forums, specifically Mr_Noodle's How to get Hazel to go into subfolders http://www.noodlesoft.com/forums/viewtopic.php?f=4&t=470

Unfortunately I can't get the rule to work. Here are a couple of rules I've tried:

Image

Image

What am I doing wrong? Thanks in advance.
ryansebiz
 
Posts: 18
Joined: Sun Sep 14, 2008 9:43 pm

Re: Delete subfolder _notes Wed Dec 08, 2010 3:30 pm • by dhy8386
This is a very common problem. Trying to do too much in one rule. Very simply just separate them.

First rule (important that its the top most rule)

If all true:
Kind is Folder

Do the following:
Run rules on folder contents

Rule 2:

If all is true:
Name is _notes
Kind is folder

Do the following:
Move file to folder trash

As a side note, may be better to say instead of "Name is _notes" to say "Name contains _notes" that way if there are extra spaces or the names slightly alter, you would still capture (that is assuming that any folder with _notes in it is going to be one you want to trash)

Let me know if it works.
dhy8386
 
Posts: 94
Joined: Tue Nov 09, 2010 12:19 pm

Re: Delete subfolder _notes Wed Dec 08, 2010 7:38 pm • by ryansebiz
dhy8386 wrote:This is a very common problem. Trying to do too much in one rule. Very simply just separate them.

First rule (important that its the top most rule)

If all true:
Kind is Folder

Do the following:
Run rules on folder contents

Rule 2:

If all is true:
Name is _notes
Kind is folder

Do the following:
Move file to folder trash

As a side note, may be better to say instead of "Name is _notes" to say "Name contains _notes" that way if there are extra spaces or the names slightly alter, you would still capture (that is assuming that any folder with _notes in it is going to be one you want to trash)

Let me know if it works.


Thanks for the reply dhy - unfortunately it's still not working. Here's what I did:

Image

Image

Image

Here are the results from previewing the rules:

Image

...and here is the last few lines of the log when I run both rules:

2010-12-08 15:32:02.352 hazelfolderwatch[22100] _notes: Rule Get subfolders matched.
2010-12-08 15:32:02.371 hazelfolderwatch[22100] jqt: Rule Get subfolders matched.
2010-12-08 15:32:02.372 hazelfolderwatch[22100] _notes: Rule Get subfolders matched.
2010-12-08 15:32:02.373 hazelfolderwatch[22100] img: Rule Get subfolders matched.
2010-12-08 15:32:02.374 hazelfolderwatch[22100] _notes: Rule Get subfolders matched.
2010-12-08 15:32:02.390 hazelfolderwatch[22100] views: Rule Get subfolders matched.

Any ideas how I can fix this? Thanks again.
ryansebiz
 
Posts: 18
Joined: Sun Sep 14, 2008 9:43 pm

Re: Delete subfolder _notes Thu Dec 09, 2010 8:43 am • by dhy8386
Indeed you are right. Tested last night. I guess when Hazel is set to go into subfolders it will not read rules to delete folders but instead only act on files. I think its now a question for Mr Noodle. Sorry.

As to your other problem, not sure why hazel is not acting on your downloads folder. That rule i know works cause i have a similar one. Perhaps Hazel has just gotten messed up. I would try deleting the folder from hazel and re-adding it and the rule and then testing again with a few dummy files - just change added to 5 minutes instead of 1 week.
dhy8386
 
Posts: 94
Joined: Tue Nov 09, 2010 12:19 pm

Re: Delete subfolder _notes Thu Dec 09, 2010 3:52 pm • by Mr_Noodle
You should switch the order of the rules. The first rule (all folders) is more general than the second one (only folders named "_notes"), so even the _notes folders will match the first rule.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Delete subfolder _notes Thu Dec 09, 2010 7:06 pm • by ryansebiz
That works perfectly - thanks Paul!

It just deleted all 321 "_notes" folders. Awesome!
ryansebiz
 
Posts: 18
Joined: Sun Sep 14, 2008 9:43 pm


Return to Support