I need a script that can delete duplicate songs within iTunesMedia but not shown on iTunes GUI

I copied entire music in itunes library A and paste it in itunes library B. I subsequently experimented with import playlist and import .XML files of itunes library A to itunes library B. I notice songs in music folder have been duplicated i.e. the gigabyte of music folder greated than gigabyte shown on itunes GUI.


Wow, I never knew importing .XML file (through import playlist) will import the songs, the metadata, the artwork and the entire playlist which i never created in the first place (I dont know what else had been imported).


Anyway, the songs are not duplicated on the iTunes GUI. They are duplicated within iTunesMedia\Music... folders. Can someone provide me a Script to delete these approx. 100GB duplicates. The DeDuper Script I have can only delete duplicate songs displayed on iTunes GUI.


Thanks for your help as usual.

Posted on Feb 5, 2012 5:43 AM

Reply
7 replies

Feb 5, 2012 7:08 AM in response to thelovelyman

I suggest you import everything in your media folder that isn't already listed in the GUI into iTunes, and then dedupe from that position. To make sure that you only add new media, rather than reimporting assorted playlists etc. use iTunes Folder Watch.


I don't know which deduper tool you have in mind, but I've written a script called DeDuper which can do the job. See this thread for background.


However, if there are no exact duplicates in your library now then once you have imported the extra media simply use the Shift-File > Display Exact Duplicates command, sort the results on date added order and remove the dupes that were added today.


tt2

Feb 5, 2012 9:02 AM in response to turingtest2

As I explained earlier, no duplicate is listed in 'Display Exact duplicates'.


I tried the DeDuper on a sample of 6 songs that are duplicated in the music folder; the DeDuper processed the 6 songs and generae a report, 'No duplicates found'. Does this script actually checked the ItunesMedia folder?


Could you test and confirm that this is the right DeDuper script?


Thanks

Feb 5, 2012 10:33 AM in response to thelovelyman

The script is only intended to work on things that iTunes would treat as "Exact Duplicates" and it only works on files that are connected to the iTunes library. Before starting all files in your media folders should be added to the iTunes library.


In the context of the earlier thread, type 1 or logical duplicates are multiple entries to the same file and type 2 or physical duplicates are multiple copies of the same file. Type 2 dupes will have identical tag information (at least they will unless you edit one of them) and the same file size so will thus display as "Exact Duplicates" if present.


The script avoids the more complex problem of trying to detect and selectively remove what I called type 3 duplicates, that is alternate recordings or rips of the same tune, principally because that is a much harder problem to automate, but also because "best track to keep" from a set of potential candiates will be a subjective matter.


The current version of the DeDuper script is 1.0.1.2 dated 2nd December 2011. I've just downloaded and run it on a test library. I had 35 tracks that I first duplicated by copying the Music folder into Automatically Add to iTunes. I then renamed Music as Music1, selected each file in turn so that iTunes would "know" the files were missing, renamed the folder back to Music and then dragged & dropped the folder into the library. This created a library of 140 tracks, 35 originals, 35 physical dupes and 70 logical dupes . The script ran as designed and reduced the library back down to 35 tracks with the 35 physical dupes being sent to the recycle bin.


tt2

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I need a script that can delete duplicate songs within iTunesMedia but not shown on iTunes GUI

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.