Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Auto-add MP3s in a folder to an iTunes playlist Apps
If you'd like to automatically get songs from MP3 blogs (to discover new music without pain), and you'd like to automatically add those songs to a pre-defined playlist in iTunes when the download ends (so you have just to fire up iTunes and click Play), well, this tip is the right solution for you. You'll need:
  • A way to automatically get MP3s from blogs or from whatever else (see below)
  • Automator
  • Growl
  • iTunes
For the download part, I personally use the free beta of Peel, a sort of MP3 blogs client that permits you to subscribe to MP3 blogs exactly like you do with your podcasts. However, the nice script described in this post by Jeffrey Venn worked fine.

If you go for Peel, you will have all music in folders like:

/Users/eldino/Music/Podcasts/PEEL/Motel Moka
/Users/eldino/Music/Podcasts/PEEL/Music for robots

As you see, you will have one new folder for every new blog you subscribe to, and Peel will download the MP3s there (a nice list of URLs to start with is available here).

For the auto-add part, I wrote an AppleScript that points to an Automator workflow: the first one goes to your "Folder Action Script" folder (something like: /Users » eldino » Library » Scripts » Folder Action Scripts), while the second goes whatever you want. Ok, let's start!
  1. By default, this workflow adds the mp3s to a pre-made playlist called AA2P (Auto Add To Playlist): this playlist must be manually created inside iTunes before beginning the game.
  2. After you created the playlist, start Automator and drag the eldino's onto Automator's dock icon: Automator will now show you the "internals" of my workflow. You can leave them as they are, or modify them for your needs (by changing the name of the playlist or the Growl notification, for example!).
  3. If you change the workflow, save it; then use File -> Save as Plug-In -> Folder Action and give it a name and save it in the Folder Action Script mentioned above; then link it to your first MP3 folder.
  4. Now go to your other MP3 folders, control-click on them, and use the contextual menu to and add/configure each to use the AA2P script.
  5. Test the game by moving or copying a MP3 file to one of your MP3 folders: if all went well, one second after the move/copy process ends, the aa2p workflow starts and pops up in the Dock: when it disappears, check your playlist in iTunes and see the magic!
Don't hesitate to contact me for comments, feedback, or insults.
  • Currently 1.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)

Auto-add MP3s in a folder to an iTunes playlist | 1 comments | Create New Account
Click here to return to the 'Auto-add MP3s in a folder to an iTunes playlist' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Auto-add MP3s in a folder to an iTunes playlist
Authored by: hypert on Mar 05, '07 04:07:16PM
I've used an AppleScript attached to a Folder Action to accomplish this too:

property extension_list : {"mp3", "m4a"}

on adding folder items to my_folder after receiving the_files
	repeat with i from 1 to number of items in the_files
		set this_item to (item i of the_files)
		set the item_info to info for this_item
		if the name extension of the item_info is in the extension_list then
			--display dialog "Adding " & the name of item_info & " to iTunes"
			tell application "iTunes"
					set this_track to add this_item to playlist "Library" of source "Library"
					duplicate this_track to user playlist " New"
				end try
			end tell
		end if
	end repeat
end adding folder items to

[ Reply to This | # ]