If you’ve been using Windows Media Player
for awhile, you may have built up quite a collection of playlists. They are likely in the
.wpl format as that is the default. If the time has come to convert those playlists to the .m3u format, you’ll find no simple solution to convert them all at once. Let this script help you out.
It is a little surprising that Window Media Player, even the latest version 12, doesn’t sport some kind of bulk playlist converter. You certainly can save a .wpl playlist as an .m3u on a case-by-case basis, but this can be slow to do if you have lots of playlists. Let me show you.
I’m using WMP 12 on Windows 7. With a playlist open, click the List options button at the top right of the Play tab. This will drop a list of options including Save list as...

Select that item and a dialog will appear.
Click Save and you’ll have an .m3u playlist. Of course you now have two playlists, one in each format, and they’ll both display in Windows Media Player. Just delete the old one. This is all well and good but, if I have several playlists, I don’t want to do this by hand for each one. So I put together a VBScript to do it for me.
To use the script, simply create a text file and change it’s extension to .vbs. Copy and paste the following into it.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
'* Copyright (C) 2011 by David Wright (davidwright@digitalwindfire.com) '* All Rights Reserved. '* Redistribution and use in source and binary forms, with or without '* modification or permission, are permitted. '* Additional information available at http://www.digitalwindfire.com. Const ForReading = 1 Const ForWriting = 2 Set FSO = CreateObject("Scripting.FileSystemObject") Set Folder = FSO.GetFolder(".") For Each File in Folder.Files If FSO.GetExtensionName(File) = "wpl" Then Set infile = FSO.OpenTextFile(File, ForReading) Set outFile = FSO.CreateTextFile(Replace(File.Path, ".wpl", ".m3u"), ForWriting) outFile.WriteLine "#EXTM3U" Do Until infile.AtEndOfStream Set matches = GetMatches(infile.ReadLine, "<media src=""(.*?)""") If matches.count > 0 Then outFile.WriteLine "#EXTINF:0," & Decode(FSO.GetFileName(Matches(0).Submatches(0))) outFile.WriteLine Decode(Matches(0).Submatches(0)) outFile.WriteLine End If Loop infile.Close outFile.Close File.Name = File.Name & ".bak" End If Next Function GetMatches(ByVal SearchString, ByVal Pattern) Dim Match Dim Matches With New RegExp .Pattern = Pattern .IgnoreCase = True .Global = False .MultiLine = True Set GetMatches = .Execute(SearchString) End With End Function Function Decode(ByVal Content) Content = Replace(Content, "'", "'") Content = Replace(Content, "&", "&") Content = Replace(Content, """, """") Decode = Content End Function |
Alternatively, you may download the script in a zip file below. Once you have the file, all you need to do is place it in the folder where you have your .wpl playlists. The default location is in a folder named Playlists in your Music folder, however, your mileage may vary. Once there simply double-click the file to run it. It will scan the folder looking for every .wpl file and create an .m3u from it. Afterwards, it will rename the .wpl by appending .bak onto it’s name. This will prevent WMP from reading it any longer and leave you a backup of your original playlist in case anything goes wrong.
Speaking of things going wrong, the script offers no error handling at this time so be careful with it. Personally, I recommend always backing up your current playlists somewhere else before you even begin. ONLY AFTER backing up first, would I run this script. It’s nice to be able to put things back in case disaster strikes!![]()
Any questions, comments or requests are certainly welcome. Thanks for reading everyone.

Leave a Reply