Automatically edit playlist .m3u file

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

abhiroopb
Posts: 68
Joined: Thu Feb 25, 2010 9:26 pm

Automatically edit playlist .m3u file

Post by abhiroopb »

I use Backup script to export .m3u playlist files to a folder on my desktop hard drive.

Then I have all my documents synced to another laptop using Dropbox. The playlist files are also synced over.

The music between my laptop and desktop are identical, however their locations are different:

Desktop: D:/Users/User/Music
Laptop: C:/Users/User2/Music

The difference is in the name of the drives and the name of the user.

So, although the playlist copies over to my laptop fine when I load it into MediaMonkey it obviously cannot find the appropriate songs (as the location on the laptop of the music files is different). All I have to do to ensure that the playlist reads the correct source of the music files is to manually edit the .m3u file in notepad and switch the track location from D:/Users/User/Music to C:/Users/User2/Music. This is a hassle on a regular basis and sometimes I forget whether I have made the change or whether I made changes to playlists on my laptop and forgot to import into desktop, etc.

What I need help with is a simple script of some sort that edits the text in a .m3u file automatically. So, whenever a playlist is updated in my playlists folder, the script would edit all the track locations so they could be read on my laptop.

Thanks!
pkw115
Posts: 101
Joined: Fri Jan 16, 2009 12:10 am

Re: Automatically edit playlist .m3u file

Post by pkw115 »

I have only recently discovered the Export M3U/Playlists For Child Nodes addon at http://www.mediamonkey.com/forum/viewto ... 12&start=0 and do not use it for the purpose you describe but perhaps it could be of some assistance? Questions in the addon's thread might get responses from users of the script more experienced than I, including the script's author.
abhiroopb
Posts: 68
Joined: Thu Feb 25, 2010 9:26 pm

Re: Automatically edit playlist .m3u file

Post by abhiroopb »

Thanks, this looks to be perfect.
Post Reply