For reasons unknown, Apple makes it really difficult to move around one’s iTunes library.
Just moving the library to another hard drive will result in all the files being disconnected. Unlike Aperture or Final Cut Pro, there is no automated path fix. If you want to correct the paths you have to do it file by file.
There’s also a hidden function inside iTunes which is really deadly (I believe it comes turned on by default) to reorder your library. If you do that, compilation albums will often be broken into the individual song. Each in their individual artist folder.
Basically if you let iTunes loose on your library, you will entirely lose Finder organisation. Guess what? Then you will be fully dependent on iTunes as no finder based album play system (the excellent Vox for instance) will work well anymore. So there is method to the madness.
Even the songs which don’t have correct metatags will all get dumped in a large virtual graveyard instead of being left in their date or album structure.
Assuming that you were clever or cautious enough to turn off allowing iTunes to organise your library, you don’t want to let Apple get their grasping hands on your library now when you move it with consolidation or anything else.
There is a work around which requires getting your hands dirty but indicates just how easy it would be for Apple to get it right.
iTunes library files
- Quit iTunes.
- Go into your iTunes library (probably ~/Music/iTunes) Once you are there, backup the iTunes xml and database files.
- Open up the iTunes XML (use a serious text editor like TextWrangler/BBedit or Smultron, we are talking about 10 to 20 MB of XML data for a six to twenty thousand song library)
- Do a find and replace in the iTunes xml file to update all of the song locations. They are stored as simple paths like: file://localhost/Volumes/MusicHall/MusicMovies/Music/
- Save and close the iTunes XML
- Now open the iTunes Library file in a text editor, delete everything, and save. If you don’t delete the data inside the library, iTunes will prefer the data from the database and erase your XML file (be careful with this one it happened to me the first time and deleted my special hand made XML file. I didn’t have the right backup: in this case, delete the new iTunes Library and iTunes Music Library XML, put the original iTunes Library back in, regenerate the XML and start again and make sure to delete the data inside the iTunes Library but leaving the file in place).
- Reopen iTunes: the library will be rebuild from the xml.
All your files should be in place now, including metadata. Apparently the date added will be changed to the current date but that’s a small loss.
Why Apple must make basic maintenance so difficult, I have no idea. If it weren’t for the internet (the base of this hint came from Metafilter), it wouldn’t be much fun owning a Mac anymore, as it would be impossible to run it as a free machine.
One of my principle grips about iTunes is that it stores album art in a database, as well as all your song ratings, instead of in the original files as well. Earlier versions of Aperture were criticised for the same thing, but pro users were refusing to use Aperture because of the data lock-in. Apple can get away with a lot more with a free app which is obligatory for all those iPod and iPhone owners.
Alec has been helping businesses succeed online since 2000. Alec is an SEM expert with a background in advertising, as a former Head of Television for Grey Moscow and Senior Television Producer for Bates, Saatchi and Saatchi Russia.