Extract And Export Winamp Playlists, Part 2

I had a desire a long time ago: I wanted to back up playlists from my Winamp music library. So I wrote a small Python script to back things up. It seems like that's the only remotely popular 'hit' on my blog, if I'm reading my analytics right.

When I exported my playlists, I backed them up, and also put them on to a few of my Linux systems. I have a bash script that changes the backslashes to forward slashes. Even still, some of my files were coming up as not found, even though they played fine on Windows.

I have expanded my export script with abilities to check and correct cases of the music in the playlists it is examining. It also checks for the existence of the file, and can drop the file from the playlist.

Winamp still uses the same XML structure as described in my first post, but I have added more variables to my script: musicDrive, outDir, stripFromEntries, correctCase, and keepDeadFiles. The names themselves and comments inside the program should suffice, I hope.

If you are interested, download my script, and download and install the Python runtime. This was made and tested with Python 3.x. Although it might run fine under Python 2.x, I don't guarantee it.

Before you run it, be sure to open WinampPlaylistProcessor.py and check those variables. outDir assumes that you have your music (and want your playlists) in your Windows 7 music folder. By default, it will correctCase of files, and keepDeadFiles.

Posted under Programming.

No new comments may be posted for this article at this time.