Move an iTunes library from a Windows PC to a Mac

As more people switch from Windows PCs to Macs, they want to make sure they can move their digital lives from their old computers to their new ones.

In most cases, copying documents is as simple as, well, copying them. Just take your My Documents folder and copy it to your Mac. But what if you want to copy your iTunes library, with all its music, and maintain your playlists and metadata (information such as ratings and last played dates)? It's actually not that hard to do, but requires a modicum of preparation.

What used to be a complex procedure is now relatively simple with iTunes 9. So make sure you're running the latest version of iTunes on both systems, and then follow these easy steps.

First you need to make some preparations on the Windows side. Open iTunes' preferences (Edit -> Preferences) and click the Advanced tab. Check both Keep iTunes Media Folder Organized and Copy Files To iTunes Media Folder When Adding To Library. These settings will ensure that all your media files end up in the main iTunes Media folder, which you will later copy to your Mac.

Next, choose File -> Library -> Organize Library. Check Consolidate Files, then click OK. This moves any files that weren't in the right folder, and makes sure that the library file has the correct pointers to these files' locations. If the Upgrade To iTunes Media Organization option is not dimmed, check this too; it sorts your files in separate sub-folders.

After this is done--these two steps may take a while if you have a big library--it's time to copy the iTunes folder. Depending on the version of Windows, this folder will be (by default) in one of the following locations:

* Windows 7: yourusername\My Music\iTunes

* Windows Vista: yourusername\Music\iTunes

* Windows XP: Documents and Settings\yourusername\My Documents\My Music\iTunes

Now copy the entire iTunes folder to an external hard drive (OS X should be able to read FAT or NTFS volumes created on a PC), or copy it across your network to your new Mac (the former method will be much faster). In either case, you'll want to copy the iTunes folder to the Music folder in your user folder on the Mac. If there is already an iTunes folder, it means you've launched iTunes at least once on the Mac. If there's no music there, you can just replace the folder. However, if you've already added music, you won't be able to merge the libraries; in the iTunes Media folder, found in the iTunes folder, move the Music folder to your desktop and add those files into iTunes after you've completed this process. (Note that you'll lose any playlists, play counts, and the like associated with those files, however.)

Once you've copied the iTunes folder to the Mac, you can launch iTunes. Since iTunes uses the same file format for both Mac and Windows, the program will be able to read your iTunes Library file and it will show your music, videos, podcasts, and so on with playlists, ratings, play counts, and the like. (Older versions of iTunes required some find/replace voodoo with the iTunes Library.xml file to update file paths, which is why you upgraded prior to transferring.)

What if your music isn't stored in the default location on Windows? In that case, you'll have a database and library files in the iTunes folder in the regular location, and an iTunes Media folder elsewhere--perhaps on an external hard drive. After performing the prerequisites (changing settings and consolidating), copy the iTunes folder to an external hard drive, and then copy your iTunes Media folder into that the iTunes folder. Copy all of that to your Mac, and launch iTunes. As before, it should work fine.

There's one more possibility: you have a large library on an external hard drive, and you want to leave it on an external hard drive. While Macs can read from and write to some Windows-formatted hard drives, they can't write to NTFS disks without additional software. If you're switching to the Mac, it's best to use a Mac formatted (HFS+) hard drive. So you'll need to copy your music files from your Windows-formatted hard drive to a Mac-formatted drive to make sure everything runs smoothly.

Launch iTunes on your Mac, open its preferences (Edit -> Preferences), then click the Advanced tab. Click the Change button next to iTunes Media Folder Location, navigate to the iTunes Media folder on your external hard drive, and click OK. iTunes will now look to that drive for you content, and everything should be working correctly. If not, choose File -> Library -> Organize Library, and consolidate the library, as above to fix any problems.

Finally, if you're switching from your PC to your Mac full time, be sure to deauthorize your PC as one of the five computers authorized to play protected iTunes Store content.

[Senior contributor Kirk McElhearn writes about more than just Macs on his blog Kirkville.]

This story, "Move an iTunes library from a Windows PC to a Mac" was originally published by Macworld.

Insider: How the basic tech behind the Internet works
Join the discussion
Be the first to comment on this article. Our Commenting Policies