I wrote an AppleScript!Posted: September 14, 2010
After messing up a migration of my iTunes library, I was left with many tracks in my library duplicated on disk
…/iTunes Music/Radiohead/OK Computer/01 Airbag.mp3
…/iTunes Music/Radiohead/OK Computer/01 Airbag 1.mp3
…/iTunes Music/Radiohead/OK Computer/02 Paranoid Android.mp3
…/iTunes Music/Radiohead/OK Computer/02 Paranoid Android 1.mp3
with iTunes using the later duplicate, the one with the ” 1″ prefix.
I made a script to iterate through all the iTunes library, find these tracks that point at these duplicate files, remap them back to the original files, then deletes the duplicate.
This was done with iTunes 9, I have no idea if the script would work on iTunes 10.