Sep 04, '08 07:30:00AM • Contributed by: prehensile
Well, be frustrated no more! Here is a handy-dandy AppleScript I wrote to do just that right in the shell. It takes the path to your newly-minted MP3 folder as an argument, and here's the code:
on run named_folder
set folder_alias to POSIX file named_folder
tell application "iTunes"
add folder_alias to library playlist 1
end tell
end run
On Leopard, save this to a text file with this as the first line:
#!/usr/bin/osascript
Then chmod a+x the script to make it executable, and you can invoke this as you would any shell script:
~/scripts/addToITunesLibrary ~/Music/mp3/_purchased/Malcolm Middleton/
On pre-Leopard systems, you'll need to save it out as a regular AppleScript via Script Editor, and invoke using osascript, thusly:
osascript ~/scripts/addToITunesLibrary.scpt ~/Music/mp3/_purchased/Malcolm Middleton/
[robg adds: I haven't tested this one.]
