My iTunes was set to make copies of all the music that it imported and keep it's own library within the iTunes folder. I wanted to delete my original files but deleted my iTunes copies instead. Now I have an exclamation mark beside all my music and since iTunes renames the files in it's own copy according to the ID3 tags, I can't simply replace my iTunes folder with my original files as the filenames and folders don't match.

The brute force alternative is to manually point each missing file to the new file location but this does not seem like a very clever solution given I have over 5000 tracks.

I don't want to reconstruct my library from scratch because I will lose precious listening and rating history from the past six years! Is there anyway I can fix this without losing my play counts and ratings?

I can a poor idea of rebuilding the file/folder structure on a new iTunes instance on another machine/account and copying the files back to the folder but this doesn't sound fool-proof. Any suggestions!

3 Answers 3


There are a few AppleScripts from Doug Adams that might help you:

  • Fix Broken Tracks will merge the data of "dead tracks" (iTunes tracks designated with "!") with the real track that you have re-added to your iTunes Library.

  • iTunes Track CPR will check your library for "dead tracks" and re-add them while keeping all the previous metadata intact. In order for this script to work, the files need to be moved back to the iTunes Music Folder.

  • Music Folder Files Not Added displays files in iTunes Media folder which are not in the iTunes library.

It's important to read the manuals for these scripts before running them. Test a script only on a few tracks at first before running it on your entire library.


If you have the original Library.xml file, you can extract the play count and rating information from the XML:

<key>Play Count</key><integer>5</integer>


I once had a problem pretty much like the one you described with my TV Shows. I know, it feels bad at the moment. Anyway, here is the deal.

Back then I was reading and examining a lot about iTunes' infrastructure. The conclusion I came to realize is that iTunes' infrastructure is so complex to deal with that you'll probably won't be able to achieve what you want and in the end you'll have to build your library from scratch.

iTunes library infrastructure isn't just a basic folder system even though it seems like that. It's much more complex than that with additional files that makes iTunes work the way it works.

Maybe someone else with more experience than me will come with a solution but then again rest assured it won't be easy.

Good luck! :)

  • Thanks for the response. I really do hope you are wrong though! but I am afraid you might be correct.
    – Shashi
    May 3, 2012 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .