iTunes Library on Network Share

Changing Music folder & moving an existing Library is well documented. more

Here's a subsequent problem if you're using a network or removable drive:

If you are not connected to the network drive, iTunes will fall back to the old Library location without informing you that it can't find the music folder.

This kind of behavior really annoys.

When trying to play a song from iTunes interface, you will be asked to locate the music file. Also, you will see little exclamation marks in the leftmost column - track number - indicating iTunes cannot locate the file.

Solution:

  1. Close iTunes if it's running
  2. Locate the xml file causing the problem. Usually '~/iTunes/iTunes Music Library.xml'
  3. Set the path to locate each song using find->replace, sed, awk, perl script; whatever. Only change the path to the 'iTunes Music' folder, or you'll make a mess of things.
  4. Start iTunes, the database will be rebuilt with the correct locations.
  5. Make sure your Network Volume is mounted before you startup iTunes or you'll have to repeat. AutomountMaker is a pretty good utility.
  6. Enjoy!