Keep Your Play Counts and Statistics When Moving Your iTunes Library
If you’re an iTunes user who doesn’t let iTunes manage your music collection, you’ll find that iTunes isn’t very cooperative when it comes to moving your music around. For example, if you decide you want to move your music from your internal drive to an external drive, you’ll find that you have to re-import your music, costing you all of your playcounts, playlists and library statistics.
There’s a better, easier way.
Here’s what this how-to guide assumes:
-
You’re a Mac user.
-
You want to move your music from one location to another.
-
The directory structure in which your music resides will not change, but rather you will be moving all of it under some top-level folder.
-
You want to keep your iTunes library as it currently exists.
Here’s how to do it:
-
Quit iTunes
-
Make note of the top-level directory under which your music currently resides. For example, since I am moving my music from my user’s Music folder, my directory is “/Users/robby/Music”.
-
Move your music from your old location to your new location.
-
Make note of the new top-level directory under which you’ve put your music. For example, since I moved my music to an external hard drive called “Music”, my new directory is “/Volumes/Music”.
-
Open up Finder and navigate to your “iTunes” directory (by default, this is in your user’s “Music” directory).
-
You should see a file called “iTunes Music Library.xml”. Open it up with your favorite text editor.
-
Open said text editor’s find/replace dialog.
-
In the “Find” field, type “file://localhost/
" -
In the “Replace field, type “file://localhost/
" -
Select “Replace All”.
-
Save the file to disk.
-
Go back to the Finder box. Drag the file named “iTunes Library” to your desktop. If you see files named “iTunes Library Extras.itdb” and “iTunes Library Genius.itdb”, do the same with those files.
-
Open iTunes. (Don’t panic, your library should be empty).
-
Select File > Library > Import Playlist…
-
Select the iTunes Music Library.xml file that you edited and click Open.
-
iTunes will import your library with your new folder locations.
-
The import will create duplicates of the iTunes default playlists, so you may want to delete those copies.
-
If all goes well, you can delete the iTunes Library files from your desktop.