iTunes: What are the iTunes library files?
The iTunes library is a database iTunes uses to organize your music. Two iTunes library files are created and maintained by iTunes for different purposes. They're both in the iTunes folder.
Location of the iTunes library files:
Mac OS X
\Documents and Settings\username\My Documents\My Music\iTunes\iTunes Library.itl
\Documents and Settings\username\My Documents\My Music\iTunes\iTunes Library.xml
Windows Vista, Windows 7, and Windows 8
Note: Windows Explorer may display the Music folder for the current user account as My Music. This is a cosmetic change by Windows and does not affect the actual location of the iTunes library files.
The two different iTunes library files serve different purposes. See below for more information.
About the iTunes Library.itl file
This file is a database of the songs in your library and the playlists you've created. Some song-specific data is saved in this file. If you delete the file, iTunes creates a new, empty copy when you open the application, but any playlists, song ratings, comments, or other information you created is lost. The iTunes Library file is only used by iTunes, and is the only one backed up by Time Machine on OS X.
Note: The library file name for versions of iTunes for Mac prior to iTunes 10.4 was iTunes Library with no file extension.
Tip: New versions of iTunes sometimes include enhancements to the iTunes library. When you open the new version of iTunes, iTunes upgrades your existing library to the new format and places a copy of the old library in the Previous Libraries folder. If everything goes fine during your upgrade to the latest version of iTunes, you can delete the older iTunes Library files.
About the iTunes Library.xml file
This file contains some (but not all) of the same information stored in the iTunes Library file. The purpose of the iTunes Library.xml file is to make your music and playlists available to other applications on your computer. In Mac OS X other iLife applications (like iPhoto, iDVD, and iMovie) use this file to make it easier for you to add music from your iTunes library to your projects.
Software interference may cause iTunes to to create an empty library file in Windows.