maintain playlist after file rename/move

Here's a common situation for me: I often rename an mp3 file or re-arrange the folder structure, which breaks my playlists, since the playlist would be referencing an invalid file.

For example, I have a file called "U2 - One.mp3" in multiple playlists. I decide to rename it to "U2 - Achtung Baby - One.mp3" which breaks all the playlists that it belongs to.

What are good ways to handle this scenario? Here is my solution, but I welcome any other suggestions. I would create custom ID3 tags for each playlist, like PLAYLIST_A = true. PLAYLIST_B = true. PLAYLIST_C = true. That way, when I change file name, I can simply filter using my custom ID3 tag, then quickly recreate the playlist without losing the file.

Here's a common situation for me

Me too!

Here is my solution, but I welcome any other suggestions. I
would create custom ID3 tags for each playlist, like PLAYLIST_A = true.

That will lose order - try e.g. PLAYLIST_A=1

I can simply filter using my custom ID3 tag, then quickly recreate the playlist

That will lose repeats - try... dunno! :wink:

For a big forthcoming rename, I'll try

  1. Copy the original paths to a custom field.
  2. Rename
  3. Export a batch file of command-line edits, to be applied to every .m3u

[EDIT:] Update: this worked fine, with Step 3 using Cygwin sed taking only about 3 mins for 6200 tracks and 80 playlists. Warning for WMP9 users: valid references can have pathname case mismatches! So be sure to match with case-insensitivity e.g. use the sed 'I' pattern option.