Most of us have had at least some of these issues, and if you're unlucky most or all of your library can end up like this.
If you know that you had music stored in several different locations, you will want to repeat this step for each. and select the database file that you created in the “Export your library” step earlier.
Note that you will end up with duplicate smart playlists that you'll later want to remove. Your entire library is rebuilt with all playlists preserved, and hopefully all problems gone away.
You'll need to know where i Tunes keeps all of its files.
Normally, this is in your (home) i Tunes folder but if you're a bit more advanced you might have set it up to be elsewhere and therefore you likely already know where it is.
This is a simple way to tell i Tunes to have a look at every single song in your library, try and find it, and move it into a nice folder structure if it isn't already.
From the i Tunes menu, select File Organize Library....There's at least a few types of information that will be lost in the process, which may be considered valuable bits of metadata for some folks: star ratings, “Loves”, play counts, and date added.If you can live without that information, this method tries to preserve everything else about your i Tunes music library.While it's a commercial product, even in its trial mode it will automatically resolve some kinds of problems, and offer to reassociate tracks that were missing their files when it can find them using its own logic.After that, even if you don't want to buy it you can use it to find a variety of other problems that you can then fix yourself.Below are a number of different suggestions, each with its own upsides and downsides.