Help With Automating Importing Songs into iTunes

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

Moderator: Mr_Noodle

Hello, I downloaded Hazel a few weeks ago and think its great. I am hoping I can create a rule to help me import my music automatically from genre specific folders to matching iTunes playlist.

Just to give you an idea I would like to be able a reggae album into the Music Reggae folder and it will automatically import any songs into the iTunes reggae playlist.

Image

Image

Could anyone point me in the right direction on how to do this by watching just the Music folder rather than watching each sub directory. I want to be able to just add a rule for each folder something similar to this:

If (
Kind is folder + Folder Name is Reggae
) {
Search sub directories for music and import into iTunes reggae playlist and delete
Delete any other files + folders
}


This is what I have come up with so far. But is there a way to add in If Kind is Music Import into iTunes, if not move to different folder?

Image

Another thought I had was to use an applescript to grab the parent folder name i.e Reggae and import to into iTunes based on that? I don't know much about applescript though?

Thanks for reading anyway and hope you can help.

Happy winter solstice everyone.
mr-ska-jr
 
Posts: 3
Joined: Wed Dec 25, 2013 10:59 am

Read the article up top about subfolders. You are combining the logic of two different things into one rule which that article should point out.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Read the article up top about subfolders. You are combining the logic of two different things into one rule which that article should point out.


Hi, thanks for the reply. I have looked at that thread before but still cant get it to work because I want to run separate rules for each sub folder. The next thing I tried was something like this. Whilst testing I just changed the colour tag of the songs rather than importing into itunes.

Image

Image

Image

I thought this would work but this changed all the mp3's to the colour of blue, rather than red for reggae and blue for rock.

Is there a way to stop the script after changing the colour of rock songs, and move onto checking the reggae rule?

Thanks
mr-ska-jr
 
Posts: 3
Joined: Wed Dec 25, 2013 10:59 am

First off, not sure what's in that first rule but I suspect it is superseding the other rules to go into subfolders. If you want different logic for each folder, you need to add a condition to the other rule which processes the files. Something like:

Kind is Music
If (all) match for (enclosing folder)
Name is "Music Rock"

To do that, you need to hold down the option key while clicking the + button to create a nested condition. There you can set the target to the enclosing folder.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Ok thanks noodle for the help I really appreciate it. I think I am one step closer but not quite there yet.

Just to clear things up, the first rule is this:

Image

So at the minute the rules seems to be working for file directly under Music Reggae / music files. However my music files are Music Reggae / ALBUM NAME / music file So this only works if I drag the song out of the album folder to the albums parent folder.

Image

Is there an easy way to go into the album folder? Or should I setup a rule to move all mp3's into the parent folder. This is adding an extra step though which I was trying to avoid.

Any ideas? Thanks again!
mr-ska-jr
 
Posts: 3
Joined: Wed Dec 25, 2013 10:59 am

The first rule you have goes into ALL sub folders. Any other rules to go into subfolders is unneeded. It seems in your case you need to go two levels up from the file to get at the proper folder name. In that case, nest the "enclosing folder" condition in another "enclosing folder" condition.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support