Thursday, March 13, 2008

how to transfer an iTunes library from PC to Mac

Having recently purchased a Mac (more on that later), we sought to migrate our iTunes library from the PC that had been replaced. Our music was, and is, stored on our HTPC, so it would be just a matter of leading iTunes to the proper directory. This sounded like a simple task, but a few Google searches on the subject told me that only the complicated ways of the Linux-like command line could help. Manually mounting the network share? CHOWN? You must be joking. This is a Mac, and operations are supposed to be made easy. I noted that none of the online guides referred directly to Leopard, and appeared to be written by those well-versed in Linux command line usage. There must be an easier way.

Being both lazy and stubborn, I copied iTunes Music Library.xml (found in My Documents/Music) from the PC to the Mac. Opening the file in a text editor revealed paths to music files, but they were obviously incorrect. To find the correct path, I imported a single mp3 file from the network music drive, highlighted it, and selected File > Get Info. Excellent! This revealed that the drive had automatically been mounted by Leopard, and with a quick Find > Replace All, every path in the XML file was updated. On the Mac, I deleted iTunes Library, iTunes Music Library.xml from username/Music/iTunes. Lastly, I simply imported the updated XML file from within iTunes.

Great! Now back to our regularly scheduled life.