Skip to content

ITunes commandline importer

Last updated on 2023-05-20

Since i swichted my fun computing (music, videos + web ) from linux to OS X i needed some tools to make thinks easier with iTunes. I was used to amarok, which make music library handling pretty straight forward. I really hate the way iTunes handles music libs, so i switched the iTunes self organzing features off and wrote a little script using python and appscript to import music via commandline.


  • batch import of folders
  • create playlists on the fly
  • remove duplicates from playlist
  • recursive mode to import trees
  • Import Folder ‘Album’ to Playlist ‘New’ and set Artist to ‘Slayer’ and Album to ‘South of Heaven’

    python -d Album -p New -a 'Slayer' -A 'South of Heaven'

    Import from Folder ‘music’ recursiv, where Playlist ,Artist and Album get name after the Folders.

    Folder Sample

               album 1
               album 2

    Will yield playlists name like “artist – album 1” and “artist album 2”

    python -d music -r


    Comments are closed, but trackbacks and pingbacks are open.