AppleScript to copy every song of an iTunes playlist


New Technology Enthusiast

Have you ever wanted to copy some songs of your iTunes library onto a USB key?

Here is a little script to do just that. Here is how to do it :

  1. Gather all the songs you want to export in a playlist
  2. Launch the following script with Script Editor for example.

tell application "iTunes" -- Asks the user to select a playlist to copy set itunesPlaylists to (get name of playlists) set selectedPlaylist to {choose from list itunesPlaylists} -- Get every track in the selected playlist set itunesFiles to (every file track of playlist (item 1 of (item 1 of selectedPlaylist))) -- Asks the user to select the destination folder (where the files will be copied) set destinationPath to (choose folder with prompt "Destination folder :") -- Creates a list of the files' path set pathsList to {} repeat with iTunesFile in itunesFiles set loc to (get location of iTunesFile…

View original post 54 more words