I found a few of these tutorials but none quite so thorough as I needed.
Update: This is a lot simpler with Windows 7 (and Vista too, probably), and makes this entire article redundant. Just choose a new location for your Music folder. Browse to C:\Users\[yourname] and right click on Music, click Properties, click the Location tab, click the Move button, choose a new location (eg. D:\Data\Music) and click Ok, Apply, etc. Say “Yes” when asked to move your files.
There are two ways; the iTunes way, using its “iTunes Media folder” method, and the “junction” method.
The “iTunes media folder” method is a setting you can change for where to store the actual media files. It’s is only good for specifying which drive takes the brunt of the storage… it won’t preserve your entire library. If you were to re-install windows (or re-image using Norton Ghost), those media files will be useless. None of the library information is preserved, even your playlists will be gone. You can re-create your library, but the process is risky because there are so many points of failure – you can lose all your playlists, or have to re-import all your music, which takes a long time.
The “junction” method is so simple. It simply re-directs the main iTunes Library folder to another location – that’s the folder that has your library information, such as playlists, playcounts, AND media. It’s a windows tool called “junction” which can make a fake folder that actually points to a different drive. It’s essentially one step, but the instructions below are about making that junction – you need to get your source folder and target folder correct, that’s where most of the steps come from. This only has ONE point of failure – and it’s not serious – if you get it wrong, your library doesn’t show up. Fix it, and it shows up. Simple.
I provide both methods below, because the “iTunes Media folder” instructions contain useful information that may come in handy if you find yourself in a scrape due to other extraneous factors. But, the “junction” method is the recommended one. Here we go…
Before you do anything below, backup your library info just in case. Go to File, Library, Export Library, and save it somewhere safe. This contains your extra song info, eg. there is a section in it called Playlists. If something goes wrong, you can always recover your playlists and song information, even if you need to do some dexterous “find and replace” exercises to do so. (The “iTunes Media folder” section below will give you an idea of how to do that, if necessary.)
Note: I consider it good practice to go into your iTunes settings, in the Advanced tab, and check the boxes “Keep my library organised” and “Copy songs into library when importing”. This means that all your music will always be in the one place, and it will make moving the library around a hell of a lot easier, not to mention keep track of where all your space is going.
Moving iTunes library – iTunes Media folder setting
- Go to Preferences, Advanced, and set the new iTunes Media Folder
- Close iTunes
- Go to the iTunes library files, mine were at C:\Users\name\Music\iTunes
- Open “iTunes Library.itl” in notepad, select all, hit delete, save, and close. So you have an empty file.
- Open “iTunes Music Library.xml”. in notepad, and do a “find and replace” to change the old location to the new location. But before you hit “Replace all”, you MUST do the following with your destination path;
- Convert back slashes \ to forward slashes /
- Convert spaces to %20, eg. “iTunes%20Media”
- Replace all, and save & close the library file
- Open iTunes. It will say things need recovering, a few times, just hit OK every time, and your library will be re-built anew with the files in the new location.
Moving your iTunes Media folder – junction
One level above the “iTunes Media” folder is the “iTunes” folder, and it stores critical library information about the songs, including your playlists.
As described earlier, we’re using “junction” to create a fake “iTunes” folder that points the system to the real “iTunes” folder somewhere else. Really, this is the functionality that iTunes should provide, but it doesn’t, so here we go. It’s actually very straight forward.
- Download “junction“
- Extract it to C:\Windows\System32
- Now you are going to copy the full path of your source iTunes folder, and paste it into an empty text document (notepad) for later. Eg.
- Now this iTunes folder can’t stay here anymore – it’s going to be replaced by a fake iTunes folder, so now is the time to move it to its final location. Move the iTunes folder and wait for it to finish transferring. (That means go up one level and cut the actual “iTunes” folder – do NOT leave an empty iTunes folder behind)
- Now copy the full path of the destination and paste it into the text document. eg.
- In your text document, surround the paths with “quotes” and precede the line with “junction -s” Your junction line should look something like this;
junction -s "C:\Users\name\Music\iTunes" "D:\iTunes"
- Hit Start, Run, type “cmd” (without the quotes) and press enter. This is the command window. Copy your junction line and paste it here by right clicking in the command window and clicking “paste”.
- Press ENTER to run the junction command.
- If you get an error, go back and check you did everything correctly. And you’re pasting from a text file, it’s easy to make minor corrections without having to re-type the entire bloody line again.
Otherwise, now you can start iTunes and it won’t know any different. Your entire library is in its new location, playlists and all, and iTunes thinks it’s still accessing a folder on C:
The only thing to remember is you will need to recreate this junction again if you format C: and re-install iTunes.