Subfolders...

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

Subfolders... Sat Apr 12, 2008 8:23 pm • by Sharkbite
Is there a way to apply rules to a set of sub folders or do you have to create rulse for each child folder?
Sharkbite
 
Posts: 2
Joined: Sat Apr 12, 2008 8:19 pm

Re: Subfolders... Mon Apr 14, 2008 3:31 pm • by Mr_Noodle
That there is. Check out the last question in the FAQ here: http://www.noodlesoft.com/faq.php#U8

You can find more in-depth discussions of it by doing a search on the forums as well.
Mr_Noodle
Site Admin
 
Posts: 8571
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Subfolders... Sun Jun 22, 2008 7:32 pm • by miriamNZ
I have just been trying to do this and it is quite tricky. I want to label all empty folders grey, and to remove the grey label when they have contents. This is within folders nested to 4 levels.
In the end I had to label all folders grey, then unlabel them if the size was greater than zero.
The problem is the *same* rule has to apply at all levels.

If I make a rule "size is 0 make label grey", this will not work as the top level folders are all greater than 0 in size, so their subfolders never get checked. I thought apply to 'folder contents' would do it, but since the folder fails the first test it does not get applied to the subfolder. Sometimes I can get it to work on the 2nd level of the hierarchy, but it fails after that.

If I make all folders grey, then my rule can run down every heirarchy and turn off grey if the size is greater than zero, because that rule will only be blocked by folders with zero content, rather than being blocked by folders with content.

This is a rather intensive process - it takes several minutes to change all the folders to grey, and another several to go around turning them off again. So I am not really happy with it. But I don't like the alternative which is to have most folders (with contents) coloured and the empty ones plain; I want to grey out the empty ones.

If anyone can see a simpler method, please let me know.

(There is a reason for the empty folders: I am trying out having a formalised filing system for project files, and it is easier to have the full set present with consistent labels, so that I can add files to the right place as the need arises.)

Regards
Miriam
miriamNZ
 
Posts: 3
Joined: Sat Jun 21, 2008 10:33 pm

Re: Subfolders... Mon Jun 23, 2008 3:02 pm • by Mr_Noodle
In the 2.2 beta (check the Beta forum), there's a new "Subfolder depth" attribute you can match on. So you can have certain rules only apply when you are at a certain folder level. If you want to try a beta version, pop over to that forum for details and give it a spin.

The other option is to do some sort of tagging of the folders at different levels though this may be a bit tedious.
Mr_Noodle
Site Admin
 
Posts: 8571
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Subfolders... Tue Sep 09, 2008 3:50 am • by JFI
Is there a way to prevent rules to act on sub folders or is it a bug in 2.2.1?
JFI
 
Posts: 6
Joined: Wed May 28, 2008 6:58 am

Re: Subfolders... Tue Sep 09, 2008 8:54 pm • by Mr_Noodle
Well, it doesn't do it by default so you would have to have a rule that is telling Hazel to do it. I need more details from you to ascertain what you are seeing. Can you tell me:

- What your rules look like?
- In what way is Hazel going into subfolders?
- What does the rule preview show?
Mr_Noodle
Site Admin
 
Posts: 8571
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Subfolders... Fri Sep 12, 2008 5:07 am • by JFI
Hi,
the rules looks like:
Image
Image
Preview looks fine. No picture detected when hidden in subfolder.
Despite this, evry now and then Hazel starts to move pictures ... even it should not.
When applied rule, it woks
----
2008-07-09 08:40:04.402 hazelfolderwatch[832] ERK_Signaling_680.jpg: Rule Pictures matched.
2008-07-09 08:40:04.405 hazelfolderwatch[832] Hazel Alert: ERK_Signaling_680.jpg has moved to /Users/me/Netzfiles
2008-07-09 08:40:04.405 hazelfolderwatch[832] [Custom Message] Hazel Alert: ERK_Signaling_680.jpg has moved to /Users/me/Netzfiles
2008-07-09 08:40:04.533 hazelfolderwatch[832] [File Event] File moved: /Users/me/Pictures/ERK_Signaling_680.jpg moved from folder /Users/me/Netzfiles to folder /Users/me/Pictures.
......
but it also noticed this:
______
2008-09-09 09:23:26.091 hazelfolderwatch[13097] Stein_03c.jpg: Rule Pictures matched.
2008-09-09 09:23:26.095 hazelfolderwatch[13097] [File Event] File moved: /Users/me/Pictures/Imported_Artwork/Stein_03c.jpg moved from folder /Users/me/Netzfiles/Stones/stones/stein_03 to folder /Users/me/Pictures/Imported_Artwork.
.........
And btw. Hazel doesn’t move the file INTO the given folder. The files sometimes stay on the toplevel above (even state other)

Anything wrong with it?
Regards
Joerg
JFI
 
Posts: 6
Joined: Wed May 28, 2008 6:58 am

Re: Subfolders... Fri Sep 12, 2008 11:43 am • by Mr_Noodle
Do you have any other rules that may be relevant? For instance, if you have another rule using the "Run Rules on Folder Contents" action, then yes, if set up properly, it will descend into subfolders. Hazel will normally not go into your Imported_Artwork folder. The other thing to check is whether you added Imported_Artwork to the list of folders that Hazel monitors.

Also, if you could post/email me a pic of the preview with all subfolders expanded it might help.

Thanks.
Mr_Noodle
Site Admin
 
Posts: 8571
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Subfolders... Sat Sep 13, 2008 3:05 pm • by JFI
Hi,
all other rules looks quite the same.
Only the target is different in each rule (pdf, dmg, txt files etc.)
And all for the named folder - it is my download collection folder ;)
But there is nor rule "act on folder" as written in the help file to force hazel to walk down the folder hirarchie. Or did I?
But I think not, because the "misbehavior" doesn’t occur immediately after copying a picture into a subfolder. There is a delay (days hours??) before my screen gets nailed with growl messages, that several hundreds of pictures from below where moved (which of course shouldn't).
Strange isnt it?
Regards
JFI
 
Posts: 6
Joined: Wed May 28, 2008 6:58 am

Re: Subfolders... Mon Sep 15, 2008 2:08 pm • by Mr_Noodle
That definitely doesn't sound right. If you could email me the rules you are using (use the "Email support" link in the "Info" section of Hazel) I might be better able to figure out what is going on.

Also, you can turn on debug mode as outlined here: viewtopic.php?f=4&t=296

If you do that, send me any relevant logs.

Thanks.
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