Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I had a hard drive crash and lost the system files, but recovered all my iTunes folders and files e.g. Books, Downloads, iTunes U, Mobile Applications, etc. The iTunes library file "iTunes Library.itl" went down with the crash. What's the best way to rebuild my iTunes library now that I have a new HDD?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You have two options:

  1. restore the library from a backup copy (previous libraries folder in the iTunes folder, Time Machine, other backups)
  2. re-import the songs by dragging the media into the library section and allowing it to add the tracks back to the library - optionally you can import any playlists or library xml documents that saved the playlists, ratings and data relating to the tracks and not embedded into the media files on the drive

If you have enabled iTunes Match, you will also be safe from most data loss since all playlists are stored in the cloud unless it contains exclusively tracks that were not matched to the cloud like podcasts and other oddities like voice memos and low bit-rate recordings.

share|improve this answer

If you still have the 'iTunes library.xml' file, start iTunes and get it to generate a new .itl library file. Once that's there, close iTunes, and open the .itl file with your preferred text editor. You'll just see a bunch of unreadable gibberish that makes up the library file iTunes reads. Delete everything in the document and save it.

Now when you restart iTunes, it will say it's trying to import your library. When you tell it to stop trying (because it won't get anywhere), it will say it's corrupted and rebuild a new one from the information in the .xml file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.