importing m3u playlists into iTunes

I haven't found a way to import m3u playlists into iTunes and have them come through in the correct order. This afternoon I wrote an AppleScript to do it for me. AppleScript makes me crazy--a PDF manual? "natural language"? seriously?

Anyway, this script:

  1. takes a .m3u playlist file that contains relative paths to the music in the playlist--generally, the playlist file will be in the same directory as the music--creates a playlist in iTunes, imports the tracks, and adds them to the new playlist.
  2. may be used by
    • drag-and-dropping m3u files on the script from the Finder
    • double clicking the script and then choosing a file
    • or putting this script in your "~/Library/iTunes/Scripts" folder (create it if it doesn't exist) and accessing it via iTunes' scripts menu.
  3. may be edited by you--open it with the Script Editor application that comes with Mac OS X (in /Applications/AppleScript)
  4. This script is provided without warranty! It is not necessarily well-implemented!

download: Import m3u Playlist into iTunes.zip

Remind me to use something else the next time I feel compelled to do any application scripting.