Page 1 of 1

Help with Hazel Parent and Subfolder rules.

PostPosted: Fri Dec 30, 2016 10:22 pm
by JAC_151
Hello all,

I have spent 2 hours and cannot get this to work despite trying various scenarios based upon Mr. Noodle's subfolder guide. Here is what I want:

Hazel is watching the Music files (the one inside the iTunes Media folder). When a new Artist folder appears (doesn't need to look at subfolders) is created because I import a new CD from a new artist that folder is copied to a backup folder. This works fine. Music -> Artist folder

But I also want this: When a new album is added to an existing artist (a new folder inside an already existing artist folder) I want this folder copied to that same backup folder. I cannot get Hazel to do this. Even placing the "run rules on folder contents." Music -> Artist folder -> Album folder

The only time I can get anything to work is when I create a new artist folder directly under Music. I cannot get Hazel to also copy when I add new album folders under an artist folder. I apologize for asking for help but I cannot understand why it isn't working.

Re: Help with Hazel Parent and Subfolder rules.

PostPosted: Mon Jan 02, 2017 12:42 pm
by Mr_Noodle
Can you post the rules as you have them now?

Re: Help with Hazel Parent and Subfolder rules.

PostPosted: Mon Jan 02, 2017 1:07 pm
by JAC_151
Mr_Noodle wrote:Can you post the rules as you have them now?


I recently deleted them and created a work around using macOS smart folders, but I can't understand why it didn't work in Hazel. I have recreated what I believe the rules were and they're hailing the same effect.

3 test folders: "ZZ Artist" which has "Album X" folder inside it. Then I have a second album folder called "Album X2"

Rule 1:
    * Kind is Folder
    *Dated Added is in the last 1 day
    *Date Added is not in the last 1 minute (will change this to when finalized to allow time for full CD import)
    --then--
    *Copy to folder "Test Folder"
    *Display Notification.

The above rule works fine. New artist folders and the album folder within at the time are copied. But Now I want Hazel to look inside existing artist folders and when a new album folder is added copy it to "Test Folder."

Rule 2:
    * Kind is Folder
    *Dated Added is in the last 1 day
    *Date Added is not in the last 1 minute (will change this to when finalized to allow time for full CD import)
    --then--
    *Run rule on folder contents.

Rule 3: (I want this one to look for album subfolders)
    * Kind is Folder
    *Dated Added is in the last 1 day
    *Date Added is not in the last 1 minute (will change this to when finalized to allow time for full CD import)
    --then--
    *Copy to folder "Test Folder"
    *Display Notification.

This may not be exactly what I had before, but it's yielding the same results. When I add ZZ Artist with Album X already inside it Hazel works perfectly. When I add Album X2 inside ZZ Artist nothing happens.

Re: Help with Hazel Parent and Subfolder rules.

PostPosted: Tue Jan 03, 2017 12:21 pm
by Mr_Noodle
I think rule 2 is wrong since it will only go into the artist folder if it is new. Which means that new albums added to an old artist folder will never be reached.

Nonetheless, a better solution overall is to have the subfolder rule, unmodified, from the article. In addition to that, another rule which operates on the music files (not the folders). When copying, you can set the option to copy over the folder structure.