Face it, your library location might change over time. When you’re using Winamp and don’t won’t to loose all valuable data like play count, last play date, … you probably searched around hours to find a solution on how to change the location to your media library (e.g. you swapped hard drives, bought a new pc, …). Rescanning your media folder is the easiest way to rebuild your media library, but you’ll loose play count, play dates and maybe more meta data.
I’ve searched the winamp forum for solutions, but the only result was people asking the same questions without getting the right answers. Depending on your Winamp version you might have tried some none working plugins too. The logical solution would be exporting your winamp media library to an iTunes XML format (and the export process will work!), but you’ll run into fatal errors when trying to import it. It all boils down to getting access to the core data file of your winamp media library (main.dat) and updating an outdated location to a hard drive or directory that has been moved.
I have tested this approach with the latest Winamp version 5.61. Try at your own risk and keep a backup in a safe place in case you run into problems.
For starters you’ve made a backup of your original user’s winamp appdata (c:\Users\<USERNAME>\AppData\Roaming\Winamp\*).
You need a HEX editor (e.g. XVI32) to rewrite the main.dat file, the core data file of your winamp media library which is typically located here: c:\Users\<USERNAME>\AppData\Roaming\Winamp\Plugins\ml\main.dat. This file changes when you open/close winamp.
Be sure Winamp is closed and open main.dat in XVI32. Let’s assume your music is located at F:\My Music and you want to change the location to D:\My Music.
On the left hand you will see the HEX codes, and on the right side you’ll find a more human friendly view. In this view the file location F:\My Music is represented by 46 00 3A 00 5C 00 4D 00 79 and so on. Notice that every character is followed by a NUL character (00). CTRL +R will show a dialog where you can easily convert F:\My Music (46 00 3A 00 5C 00 4D 00 79 …) into D:\My Music (44 00 3A 00 5C 00 4D 00 79 …) in HEX format. It’s good practice to see if the total amount of replacements resemble the total amount of music files inside your (old) winamp media library. If not, you have done something wrong, or some files got missing. You can rescan your media folder with winamp to remove broken links.