Migrating iTunes Library Between Systems
By default, iTunes places its library database and media files into the iTunes folder of the user's “My Music” folder. However, the iTunes library database contains full pathnames instead of paths which are relative to the root of the file structure (ie. My Music\iTunes).
Thus moving an iTunes library from one system to another may require iTunes to rewrite all the path references, unless the path conventions are the same on both systems.
For example, if moving an iTunes library from Windows Vista to Windows 8, with the same username, the path to the root will be the same: C:\Users\<Username>\Music\iTunes. It is then a simple matter to replace the entire contents of this folder on the new (target) system with those on the old (source) system.
However, if the username has changed, or the operating system has different path conventions, such as Windows XP from Windows Vista, an alternate process is required.
Note the following processes assume the target system is a new system, without an existing iTunes library.
Migrating iTunes Library From An Unlike System
- If the source system is live, update iTunes with Apple Software Update. Open iTunes and wait while iTunes updates the library to the latest format (if necessary).
Then have iTunes consolidate all the media files under the iTunes root folder by using File → Library → Organise Library:
Select Consolidate Files and Reorganize File and click OK. iTunes will then identify any media files which are stored outside the iTunes library root, copy them into the root and rewrite the path reference to that media in the library. It will also relocate and rename media paths and filenames so they match their name in the library. This process may take some time.
- Determine the iTunes root on the source system. For example, on some Windows XP systems it might be:
C:\Documents and Settings\John Smith\My Documents\My Music\iTunes
- Open iTunes on the target system. It will run through a setup wizard (ignore this), and create a blank library.
- Determine the iTunes root on the target system. For example, on Windows 7/8 systems it will be something like:
- Make a folder on the target system which mimics the iTunes root from the source system. For example, open a command prompt and type:
md "C:\Documents and Settings\John Smith\My Documents\My Music\iTunes"
On Windows Vista and above, C:\Documents and Settings already exists as a junction point (a link to another folder) which is ostensibly for backward compatibility. However this interferes with this process, and in any case is not needed. To remove the junction point, download Microsoft's Junction tool and run the following command:
junction.exe -d "C:\Documents and Settings"
(Note removing a junction point is perfectly safe.)
- Copy the iTunes library from the source to the target. For example, to transfer using a removable drive (say F:), use the following command on the source system:
xcopy "C:\Documents and Settings\John Smith\My Documents\My Music" F:\ /s /d /y /h
Then on the target system:
xcopy F:\iTunes "C:\Documents and Settings\John Smith\My Documents\My Music\iTunes" /s /d /y /h
- Copy the iTunes library databases to the target system's default iTunes location:
copy F:\iTunes\*.* "C:\Users\John Smith\Music\iTunes" /y
(This only copies the files in the root folder, not any of the subfolders.)
- Open iTunes. Your library should now be accessible. At this point, iTunes has loaded the library database from the new location (C:\Users\John Smith\Music\iTunes), but the media files are still in the temporary location which mimics the old library location (C:\Documents and Settings\John Smith\My Documents\My Music). Play some media to test this is the case.
- The final step is to have iTunes consolidate all the media files into the iTunes root folder. This is the same process as above: go to File → Library → Organise Library, select Consolidate Files and Reorganize File and click OK. Whereas on the source system this might have been relatively quick, on the target system it will take much longer because every file must be copied.
- When completed, test some media files are in the right location by right-clicking and choosing Get Info. On the Summary tab, verify the file is now located in C:\Users\John Smith\Music\iTunes.
- The temporary copy of the iTunes library located under C:\Documents and Settings\John Smith\My Documents\My Music\iTunes may now be deleted.
Moving An iTunes Library From One Profile To Another
When migrating an iTunes library from one user profile (say, user “John Smith”) to another (say user “JSmith”) on the same system:
- Log in as “John Smith” and complete step 1.
- Log in as “JSmith” and complete steps 3 and 4.
- Open an elevated command prompt and complete step 7 with a command such as:
copy "C:\Users\John Smith\Music\iTunes\*.*" "C:\Users\JSmith\Music\iTunes" /y
- Open Windows Explorer in elevated mode.
- Then continue with the remainder of the process from step 8.
(An alternative to opening Windows Explorer in elevated mode is to ensure the new user account has permission to access the old user account's profile.)