From the posts above, many individual missteps were made: some recoverable; most not. What is needed is a better understanding of how iTunes works and manages your Library. If you take the time to read the following info and related links, it should help. If not to fix your immediate self-inflicted issues, then at least to help you avoid them in the future, or recover from them if other missteps are made.
First off – make and archive multiple backup of your complete Library: the Music Files, Library Database files, XML files of Playlists and other Metadata, etc.
See This Thread for complete information of what is considered a full backup.
Second – Get a good understanding of how iTunes manages your data. This well-written
iLounge Article is a must-read for anyone considering moving their Library to a new computer or a new location. Or, just wants a better understanding of how iTunes manages your music.
In addition to the iLounge article,
This Thread give you more info on ‘Cloning’ or ‘Moving’ your Library without losing your data.
Some iTunes and Library concepts that need understanding:
iTunes operates as a database of information for your music files. The actual music files are stored on your PC, not within iTunes. iTunes keeps
absolute references of the music file location and other information in its database file. This allows iTunes to use music files from any location on the PC: different directories/folders on the main HD, another internal drive, an external drive, or a network drive (or any combination of the above)
all at the same time.
The "Main Library" (the gold "Library" icon) is basically a list of references to the music files on your computer. These files can be anywhere on the internal hard drive, an external hard drive, or any combination of several folders or drives. The Library is holding, more or less, a pointer to those files. The Library must contain all the music known and available to iTunes. This is the ‘Master Inventory List’ of your songs. Playlists are your views to subsets of that Library and there are two kinds: Smart & Static.
The iTunes music information (meta-data) is stored in two places: the actual individual song files themselves, and the iTunes Library database file (‘
iTunes Library.itl’). There is a corresponding XML file that is created by iTunes, but not directly used. See:
What are the iTunes Library files?.
Each song reference has a specific and hardcoded location (both drive letter & path) so iTunes can find and play (or sync) it. Move the file, change the path, re-map the drive it is on, shut down or remove the Drive, and iTunes will lose the file (giving you the '!' of a ‘Broken Link’). Lose, move or corrupt the ‘iTunes Library.itl’ file and your complete Library will ‘vanish’.
If you delete, corrupt, or otherwise lose your ‘iTunes Library.itl’ file, you will end up with a ‘blank’ Library within iTunes. Nine times out of ten, your underlying music files are still on the PC. They can be ‘re-Added’ via the File==>Add Folder/File menu command, but you will lose some of the music meta-data. Recovering your Library via backup copies of the iTunes database file, or from importing the XML file is always preferable.
Song attributes stored directly in each music file are as follows: Artist, Album, Song Title, Year, Comments, Compilation tag, Lyrics, Genre , Grouping, Composer, BPM, Album Artwork, Bit Rate & Kind (Both not tags - inherent to the file itself).
Song attributes stored in the iTunes Library database file only are: Playlists, Ratings, Play Count, Last Played, Date Added, Date Modified, Equalizer, Volume Adjustment.
While it appears that all of the music attributes (except for Album Art) are also written to the main XML file, when ‘Importing’ the XML file back into iTunes, it will not re-apply the original ‘Date Added’ attribute to your Library references. That attribute will be populated with the date you import the XML file. The XML file can be somewhat useful, but it is usually better to have legacy copies of the ITL file for quickly restoring your complete Library.
It is a very good idea to make additional backups of your metadata by using one of Otto’s JavaScript files to save your metadata to an XML file. See:
http://ottodestruct.com/blog/2005/10/20/itunes-javascripts/ . Also pick up Otto’s SaveRatings program:
http://ottodestruct.com/itunes/SaveRatings.zip .
A "Smart Playlist" looks at the various ID3 tags stored in your music files and automatically fills itself based on the criteria you define for that playlist. These playlists have a dark purple icon with a picture of a gear. A "Static Playlist" holds whatever entries you drag into it from the gold Library, a Smart Playlist, or another Static Playlist. You can ‘lock’ a Smart Playlist by dragging its complete contents into a Static Playlist. These playlists have a light blue icon with a picture of a music note.
"Importing" in iTunes refers to ripping music off an Audio CD. When you do this, the music file is copied from the CD to the default library folder on your hard drive (as defined in your Preferences), and the pointer (Reference) to those copied music files is added into the Library.
If you have other existing music files (MP3s, AACs, Lossless, whatever) you can "Add" them to the Library. Depending on your iTunes Preferences, this may copy those files into the default library folder and then add the pointers to those copied files, OR it may not copy the files and simply add pointers to the existing files in their original locations. In the first case, you end up with two physical copies of your music files (the original file in its starting location and another file located in the designated iTunes music folder). In the second case, you end up with only the original music files in their original location. Used incorrectly, Adding music can bloat your PC with needless duplicate music files. I usually ‘Add’ my music files into the iTunes folder, verify that they copied/transferred correctly, then delete the original files.
Changing (or designating) the 'iTunes Music folder' location in the Preferences does not instruct iTunes where to look for
existing songs it currently knows about (or has 'lost'). It directs iTunes where to store any
new songs it
Imports, or
'Adds' and copies to its Library organization (if that attribute is selected). This is an important distinction: Ripped (from CDs) or ‘Converted’ (via iTunes) songs always go to the current Library Folder location.
Songs already on the computer HD that are added to the Library only get copied to the current folder location if you have that box ('Copy files to iTunes Music folder when adding to Library') checked in the Preferences. In the latter case, you will have two instances of those song files on the PC: the original file and the new file within the iTunes folder structure.
See:
About the Add to Library, Import, and Convert functions
Best of Luck