Friday, 22 October 2010

the path of the library on computer A is not the same with path on computer B;

iTunes does not manage the library automatically;

use iTunes 10

don't want to lose the 'Date Added' property on each song

I got a new laptop with Windows 7 while the old one was XP. Of course, My Music folder path changed from something like C:\Documents and Settings\username\My Document\My Music to the Windows 7 format C:\Users\username\Music.

I do not let iTunes manage my music library, so I was on my own and I was about to corrupt the iTunes Library.itl file and edit/replace the iTunes Music Library.xml file. You can find a very good blog about this here.

The drawback of the above method is that, after being cumbersome and hacky -- not that I mind that, it also results in the loss of 'Date Added' property of each song.

Lucky for me, I found out that iTunes 10 will try and search for your misplaced library songs upon locating one item in the library.

Here is what I did:

Start iTunes

In your Music library, try to play a song

iTunes will complain that it cannot find the song: "The song 'xxx' could not be used because the original file could not be found. Would you like to locate it?"

Click 'Locate'

A file selector dialog comes up and prompts you to select/locate the song file. Provided that you have an idea where the song is, go ahead and locate it. (If you don't know the location, you can search for it on your computer)

Once found, select the song, press Open.

iTunes will now prompt you with another dialog: "Would you like iTunes to use the location of 'xxx' to find other missing files in your library?"

Click 'Find Files'

BINGO! iTunes will now go through your library and match the other songs to their new paths. In my case it took only a few seconds to 'find' about 2000 songs. All songs properties were preserved!