Posted 9-20-2008 12:41 pm
I noticed there were a ton of duplicate files coming into itunes the last time I did a file import... I deleted the duplicate .m4a files with windows explorer... I figured that itunes would check for them on startup and get rid of the links to dead files. Not the case.

Trust me, this sounds more complicated then it is... Let me know if you need help.

I did a little digging and found a script that will do it for you. You can download itunes sdk
HERE:
http://developer.apple.com/sdk/itunescomsdk.html

Download the zip file, then extract it.
Remember where you extracted it to!!
------------------------------------------------
It's handy to copy and paste the path RemoveDeadTracks.js file to notepad

Here's a sample path...
(ex. C:\Documents and Settings\YOURID\MyDocuments\download\iTunesCOMWindowsSDK\iTunesCOMWindowsSDK\SampleScripts)
------------------------------------------------

Next go to Start>>Run>>Type cmd>>press enter
Type cd \ >>press enter
Go and copy the path to the file again
Type cd
right click and paste the path into the CMD window. Youre full command should look something like this: cd C:\Documents and Settings\YOURID\MyDocuments\download\iTunesCOMWindowsSDK\iTunesCOMWindowsSDK\SampleScripts
Now press enter again!
--------------------------------------------------
You have just changed your current directory to the one that the RemoveDeadTracks.js lives in... Now you can run it.
--------------------------------------------------

Type cscript RemoveDeadTracks.js>>press enter
The cmd window will seem to pause, itunes will open (if not already open)
check out the bottom of itunes, you'll notice that the number of songs in your library is going down...

I doesn't take long to complete, and you are left with a clean library that should make you and your iPod a little happier.