Applescript to copy/export mp3 by album
Dear all,
I would like with applescript copy all selected album from iTunes to a USB key (to be used in my car) but I would like the mp3 are copied in specific folders (according the album name included in the tags of mp3). I have slightly modified a script found on the net (see below) but all mp3's are copied in the same folder and I dont know how to read the alcum tag and create a specific folder to copy all mp3 related to the same album. As you can see, I am new with applescript... Any idea to help me. Thanks a lot. Frankie666
+++++++++++++++++
if application "iTunes" is not running then
display alert "iTunes is not running" message "Please activate iTunes and select items."
return
end if
-- Choose destination location
choose folder with prompt "Choose a folder to copy the selected iTunes items into:" default location (path to desktop)
set DestinationFolder to the result
set {TrackLocations} to {{}}
-- Get filepaths of the selected iTunes items
tell application "iTunes" to repeat with SomeTrack in (get the selection)
try -- skip items that are not file tracks (no location)
set the end of TrackLocations to location of SomeTrack
end try
end repeat
-- Copy all selected MP3s
repeat with SomeFile in TrackLocations
tell application "Finder"
duplicate SomeFile to DestinationFolder
end tell
end repeat
tell application "Finder" to reveal DestinationFolder
iTunes-OTHER, OS X Mavericks (10.9)