JJB Blog

An excellent script for removing duplicate files from an iTunes library

After shifting some media around I recently found myself with a lot of duplicate files in my iTunes library. iTunes’ “Show Duplicates” feature is a nice thought but doesn’t come near being useful in the case of thousands of duplicates — not only is the heuristic sophomoric, there is no way to select “every other” file — you must select either all the files or none of them.

I searched far and wide for a third-party program or script and was surprised by how poor the solutions were. I found a handful of shareware programs that were either flakey, underfeatured, overpriced, or all of the above, and a smattering of shell scripts that didn’t do quite what I was looking for.

Finally I came across this applescript, and it does precisely what I want (and what I imagine everyone with this problem wants): finds duplicate songs according to user-specified metadata dimensions, and put “all but one” of each file in a playlist. Select all, option delete, DONE.


16 Comments

Glad my script helps you! I swear, sometimes the littlest things, like that script, are the blog articles everyone hits!

Posted by Eric Pugh on 25 May 2007 @ 2pm

Is there a Windows XP variant of this script?

Posted by Robert on 28 August 2007 @ 4pm

Verry nice thanks for the excelent work !!

Posted by Sieger Suurbier on 6 September 2008 @ 12pm

Heh. I got a bunch of errors when I extracted the files, and the program was not found. A flop!

Posted by xx on 8 September 2008 @ 2pm

were u able to find a windows xp and or vista script variant to get rid of the duplicate entries in i-tunes? i have no clue what i did wrong but i know have doubles triples and in some cases quads of my entire library…grgr!

Posted by lynn on 20 October 2008 @ 7pm

This seems only to remove dups from a playlist not the actual music folder…

Posted by Ian Atkinson on 3 December 2008 @ 2pm

I use Duplicate Finder by Ashisoft to remove duplicate duplicate files from my windows system and always want one for my MAC. Thank you for this script.

http://www.ashisoft.com

Posted by John on 15 January 2009 @ 10am

@ian, in that playlist, highlight all to be deleted, edit the info, and rename them to Artist: delete. then in your library delete all artists named delete :)

Posted by kaleb on 18 July 2009 @ 12pm

I have been searching for such a script for long time and it was a helping info for me. Thanks a lot.

Posted by Alex on 30 September 2009 @ 4am

i use duplicate file remover software called duplicate finder 2009

Posted by DeRose on 16 November 2009 @ 4am

As Iain Atkinson says, it doesn’t seem to actually remove the tracks from the Music folder and instead, just the playlist that is created.

Posted by Ross on 15 March 2010 @ 11am

Hello! This looks like this is the solution I’ve been looking for, but the link appears dead these days. Any chance for another working link or for an email with the script?

Thanks- Jonathan

Posted by Jonathan Kumar on 27 August 2010 @ 7am

i get a 404 on the link of the script !

Posted by min on 3 October 2010 @ 10am

The link to download this script no longer works.

****Can someone send me the script as an email attachment to: Benstaab1@gmail.com

Thanks,
Ben

Posted by Ben on 4 November 2010 @ 3pm

Here’s the new link folks (also corrected in my post above)

http://www.opensourceconnections.com/2006/11/11/better-itunes-song-deduping/

Posted by John on 16 November 2010 @ 12pm

And here’s a working download link for the script: http://opensourceconnections.com/wp-content/uploads/2007/02/corral-itunes-dupes-eric.zip

Posted by yeirk on 4 February 2011 @ 7am

Leave a Comment