Trouble processing rules one subfolder deep.

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

Moderator: Mr_Noodle

I've tried a combination of solutions without getting the expected results, so I was wondering if anyone could help.

What I want to happen is this: In the Downloads folder, if any subfolder contains Music files, I want to import them into a playlist in iTunes. I already have a rule that processes Music files in the Downloads folder itself (as these single files go into a different playlist).

I tired setting Subfolder Depth is 1, then Kind is Music, but Hazel doesn't even find the files. (For instance Downloads/Mars Volta/Song.mp3).

Any help would be appreciated.

Ron
neverminding
 
Posts: 6
Joined: Tue Mar 22, 2011 4:26 am

Instructions are found here.

viewtopic.php?f=4&t=470

If you don't get it let me know. I'm happy to help.
justinkthornton
 
Posts: 26
Joined: Wed Aug 03, 2011 11:50 am

I tried using the basic instructions in the sticky post, but it doesn't seem to work for this case.

I'll try to be a little more specific.

1) I have a rule for my Downloads folder that takes music files in the folder itself (not nested in other folders) and puts them in a "New Singles" iTunes playlist. It works as expected. The rule looks like this:

Image

2) The second rule I'm trying to create will look in folders in the Downloads folder for music files and put them in a separate playlist titled "New Albums", based on the condition that they are nested in a subfolder, like this:

Image

The rule:

Image

I've tried every possible combination to look into the subfolder but I can't get Hazel to even recognize the music files are there. I feel like I'm missing something obvious.

Ron
neverminding
 
Posts: 6
Joined: Tue Mar 22, 2011 4:26 am

To run a rule that looks into a subfolder you always have to have another rule that looks like this:

If

kind is folder

then

run rules on folder contents.


If you add anything else to the rule it won't work.

First, before we can go on. Do you have a rule that looks exactly like this one?
justinkthornton
 
Posts: 26
Joined: Wed Aug 03, 2011 11:50 am

Hm. I do not.

Does this have to be its own rule? I'm not sure I understand. If you need this condition, then there is no way to say "run rules only on music files" since they cannot be combined with "kind is folder" rules.

Is there a way to say "run rules on folder contents IF they are music files"?
neverminding
 
Posts: 6
Joined: Tue Mar 22, 2011 4:26 am

It has to be it's own rule. It can contain nothing else.

It basically tells the rest of the rules that they can look into the subfolders. But it will tell all the rules to look into the subfolders. That means you have to be extra careful and creative in how you make your rules, otherwise it will do all sorts of unintended things.

This, I believe, will be changed in version 3 so you can only tell one rule to look into the subfolders.
justinkthornton
 
Posts: 26
Joined: Wed Aug 03, 2011 11:50 am

It won't work quite like that.

Basically, just look at the rule. The subfolders rule has to be separate because that rule matches folders. It makes no sense to add conditions and actions pertaining to files. Take each entity and match it against the rule. Does it make sense for that rule to be a folder as well as a music file at the same time? Most likely, no. In such a case, you need to separate that logic because you are mashing two concepts together in one.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support