The last little while, I’ve been moving my stuff over from laptop to my desktop as my desktop will now be my primary computer. Everything seems to have gone pretty smoothly as I have had a good separation between data and programs for awhile now. I’ve been delaying the move of my iTunes because I bought an iPod dock from Ebay ($4! fits every type) and was waiting for it to arrive.
There are instructions online on how to move your iTunes library from one computer to another. I wanted to preserve all my metadata (i.e., playcounts, ratings, etc) if possible and there is an established way to do this. Basically you:
- Take the XML file of your library,
- Do global search and replace to fix up the paths,
- Drop the updated XML file in your new iTunes library folder,
- Zero out the iTunes Library database file (the one that has a .itl extension),
- Restart iTunes and it will rebuild your library.
This works almost perfectly. The only metadata that is not preserved is the date that the file was added to your iTunes library (it sets it as the current day).
Well 95% is better than nothing right? In my case, the Date Added field was pretty important because I use smart playlists that change how often the song is played based on when I added the song to iTunes (old songs get fewer plays). After some research, I found out that the Date Added field in iTunes is read-only, and can only ever be set when the file is imported (short of reverse engineering the iTunes Library database). So that sucked, but I decided that I still wanted my Date Added metadata.
So, my recourse was to copy my old iTunes Library, with its incorrect paths, and load it on my desktop. That worked, with all metadata preserved; except none of the songs could be found (the paths were all wrong!). I looked at ways to fix this, and it seemed like using the iTunes SDK was a good bet. Unfortunately, the Windows SDK doesn’t allow you to set the location of a file, only to read the location! So I’m now resorting to manually updating the file path by searching for it in the file system. I’ve gotten the time per song to under 10 seconds, so with ~2200 songs in my library, I’m looking at spending 6 hours this weekend updating iTunes. Yay.