Created
February 22, 2014 02:48
-
-
Save jspiewak/9147887 to your computer and use it in GitHub Desktop.
Copy iTunes music to SD card
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set dest to choose folder | |
tell application "iTunes" | |
set the_tracks to tracks of playlist "Audi Q5 MMI" | |
repeat with t in the_tracks | |
set ll to get location of t | |
set a to album artist of t | |
if length of a = 0 then | |
set a to artist of t | |
end if | |
set ab to album of t | |
-- Deal with compilations, unknown artist | |
-- Put script into github | |
tell application "Finder" | |
if not (exists folder a of dest) then | |
make new folder at dest with properties {name:a} | |
end if | |
if not (exists folder ab of folder a of dest) then | |
make new folder at folder a of dest with properties {name:ab} | |
end if | |
duplicate ll to folder ab of folder a of dest | |
end tell | |
end repeat | |
log "Done!" | |
end tell | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment