You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

📰 Newsroom Update

Billie Eilish is Apple Music’s Artist of the Year for 2024. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to delete duplicated songs all at one time?

I would like to get help deleting duplicated songs, I do not know how they got their in the first place.

Windows 7

Posted on Aug 28, 2011 10:29 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 6, 2017 10:14 PM

Some how I got duplicates of my library on iTunes and to get rid of all the new duplicates I went to the library I looked for the date the new duplicate songs were added to the library then I went to columns and where you see Artist, song,

bit rate, time, etc and added 'date added' once that's done click on the box enclosing 'date added' and you will see all songs added by date. Proceed to the last one of the songs with that date press command to highlight it then scroll all the way to the first song and press 'shift' to highlight all of the songs added on that date then simply press delete.

you will be asked if you want to delete these songs...That's it.

483 replies

Sep 25, 2015 1:31 AM in response to akfakjkhk

See Backup your iTunes for Windows library with SyncToy and Make a split library portable. My guess is that something in your strategy for moving content between computers is behind the problem. You should copy over a complete working library. Copying the media into a new library, or connecting your devices to an empty library should be avoided.


tt2

Nov 3, 2015 8:27 AM in response to Firebird2k6

FindTracks is pretty flexible (see Re: Any software that can rebuild iTunes songs lost to Unknown Artist/ Unknown Album for details) however it expects to find the tracks at a path based on the known properties of the file the last time iTunes had access to it. If a different application/library has both changed the album name and moved the track to reflect that change then the script will fail unless the new and old names are a fuzzy match to each other. Perfect for fixing say Motorhead > Motörhead but not Motorhead > Greatest Hits.


If you could give me a few of examples of the true path of a missing track, and the corresponding location information in iTunes I can see if I can understand why the search is failing and perhaps make some suggestions, or a tweak to the script if appropriate.


DeDuper works with tracks that would qualify as Same Album duplicates in iTunes. If you turn on Track No., Disc No., & Album Artist in addition to Name, Artist, & Album, it may become clear why DeDuper hasn't cleaned up one of those two tracks. It also won't work if all copies are missing in action.


A visit to Repair security permissions for iTunes for Windows might not hurt.


tt2

Nov 3, 2015 8:56 AM in response to lenardsimp

Try inserting this line as a new Line 419.


Trace T,"Archive from " & L & nl & nl & "to " & NewPath


If you don't have Notepad++ the existing line 420 reads "File.Move(NewPath)" so insert before the comment before that.


This will show what file is being moved from where to where and might help reveal the cause of the problem. In a similar fashion to my comment above to Firebird2k6 it might not hurt to make sure that permissions are correctly set on the media folder. See Repair security permissions for iTunes for Windows for details. What antivirus package do you have, if any? Temporarily disabling it might help if it is locking the files in some fashion when the script tries to move or delete them.


tt2

Nov 3, 2015 5:10 PM in response to Firebird2k6

The standard layout that iTunes uses for music is:

<Media Folder>\Music\<Album Artist>\<Album>\[[<D>-]## ]<Title>.<Ext>

It doesn't cope well if you move files around manually. Are you saying all of your tracks are now in the layout?:

<Media Folder>\<Artist> - <Title>.<Ext>

If so then the script ought to be effective as that is one of the variations that has been programmed into it.




Each track in an iTunes library and on a device has a unique TrackID. iTunes normally uses these to sync ratings and playcounts. The SyncStats script uses the track properties to provide an alternate key to each each track when the TrackIDs don't match because the library has been reconstructed.



If you have to go back to the device for all of the content see Recover your iTunes library from your iPod or iOS device.

If you end up restoring to a standard iTunes layout it should be possible to make a simple tweak to my script ConsolidateByMoving to enforce your desired structure in a way that keeps iTunes happy.


tt2

Jan 28, 2016 2:53 AM in response to FM3017

See my article on Grouping tracks into albums for some general background on how iTunes organizes content. It is the tags that matter, not the filenames. Unless you have good reason to do otherwise let iTunes manage the file and folder names then as you update the tags the files will be moved and renamed accordingly. See also Make a split library portable. Make your iTunes library in the root of an external drive and move your content inside the iTunes Media folder before adding it to iTunes. Repeatedly importing folders located outside of the media folder is a common way to create duplicates, and they can also be created when the library is split if iTunes is launched when an external drive is offline as iTunes may not correctly recognize content that has already been added to the library. Backup regularly to another drive as you go.


Consistency is a key ingredient for a well ordered library. If your library is organized neatly then it easy enough to make one new album fit in properly, but fixing up a large library will take patience and persistence. The column browser is a useful tool for this. You can step through one artist or album at a time looking for anything that is out of place, e.g. missing artwork or other details, track number in the Name instead of Track #, split or duplicate albums where you expect one, or merged albums when you expect to see two, alternate names for the same artist, etc. and of course any actual duplicate tracks. If you have any older iPods then you'll also want to consider the effects of featured & guest artists in the Artist field, otherwise the Album Artist field can be used to ensure albums group together.


Given you're on a Mac see Doug's AppleScripts for iTunes. He has some useful tools for managing iTunes on OS X.


tt2

Jan 21, 2012 4:46 PM in response to Suavecito69

Note: These instructions are geared toward users who do not work in a technical field - e.g. my wife :-)


  1. Open iTunes.
  2. Click Music under LIBRARY.
  3. Search for the album that has duplicate tracks.
  4. Right click anywhere on any of the column headings (e.g. Name).
  5. Select “Date Added” and “Track Number”.
  6. Click on the Date Added column heading.
  7. Pick any of dates (at random) and select all the songs that have that same date.
  8. Right click and select Delete*.
  9. Choose whether to add the tracks to Trash (recommended) or to remove them permanently.



*How to ensure that the songs you’re about to delete are indeed duplicates

  1. To ensure that the songs in questions are in fact duplicates, click one of right click one of the songs and select Get Info.
  2. Memorize or make note of all the information starting with “Kind” through “Encoded with”.
  3. Select the other song that is believed to be a duplicate.
  4. Memorize or make note of all the information starting with “Kind” through “Encoded with”.
  5. Compare the pieces of information one by one. All of them should be the same except “Date Modified”.

Jan 18, 2015 10:32 AM in response to jcsthis

Hi,


The various types of duplicates are handled with the following criteria:


  1. If the script is running against a playlist and there are two references to the same iTunes track object the later one will be removed.
  2. If there are two entries linked to the same file on the same path the script will keep the earliest import.
  3. If there are two entries linked to the same file via different paths the script will keep the earliest import.
  4. If there are two files that appear to be physical copies of each with the same details and file size, the script will keep the earliest import.
  5. If there are two files with the same details but different sizes the script will keep the largest, unless you edit a preference flag to choose the smaller, or one format in preference to another.
  6. If there are two entries with the same properties, one of which is connected to a file, and the other has a broken link (i.e. the file is not where iTunes expects to find it) then it will remove the broken link.


In all cases other than the first one play/skip counts/dates are merged to the track that is kept, and this will be added, if necessary, to any playlists that the removed entry was a member of.


tt2

Nov 4, 2015 5:17 AM in response to Firebird2k6

I'm familiar with the issue of secondary artists, particularly on the iPod classic. If fact it is what brought me to this site in the first place. Not finding the answers to hand I set about working them out for myself. My Grouping tracks into albums article is the result of trying to nail it all down so that my library works well in both my computer and my devices.


I'm still not sure why neither FindTracks or DeDuper are proving effective. Perhaps if you can show all of the details for some specific examples it might help. Relevant details are:

  • True path

  • Path shown in Get Info > File > Location

  • Compilation

  • Album Artist

  • Size

  • Artist

  • Album

  • Disc Number

  • Track Number

  • Name

Dupes are matched on the last 5 or 6 properties, or the first one in some cases.


tt2

Mar 16, 2012 12:21 AM in response to PWWW

I wonder if there is a permissions issue. Try this.


Right-click on your main iTunes folder and click Properties, then go to the Security tab and click Advanced. If necessary grant your account and SYSTEM full control of this folder, subfolders and files, then tick the option to replace permissions on child objects which will repair permissions throughout the library. If your media folder is separate from the library folder then repeat for the media folder. This is the XP dialog but Windows 7 shouldn't be too different.


If it won't let you change the permissions use the Owner tab to take ownneship from an account with administror privileges.


User uploaded file


tt2

Aug 29, 2011 1:42 PM in response to turingtest2

I've completed a new version of the DeDuper script that can now automatically delete redundant copies of both type 1 and type 2 duplicates where type 1 are identified by having the same file path, and type 2 by having the same artist, album, disc no., track no., track name and file size. As before the earliest imported copy of each file is preserved, play & skip counts are combined, the latest played or skipped dates are set and, in addition, the highest track rating is preserved. Type 2 duplicates which are deleted are sent to the recycle bin, but given the tests of both metadata and file size it is extremely unlikely for these files not to pure byte by byte duplicates that we are happy to delete. I'll leave type 3 for cleaning up by hand.


The script isn't very fast, at least not for me, but that is probably down to old hardware and a largish library. iTunes rewrites the entire database after every minor change so the larger the library, the slower a script will run. Test it on a few hundred tracks and, if you are happy it performs as described, leave it to run while you do something else. The program runs in two separate stages and after each you can decide whether or not to proceed with the removal of redundant copies.


tt2

Sep 27, 2011 6:09 AM in response to turingtest2

I'm having trouble with the DeDuper script. It fails with a VBScript error (Code 800A01A8, if that helps) on Line 443 Char 3 with the following error: Object required: 'objFolder'


It seems to occur when there are 4 duplicates. Most of the songs being processed have 3 duplicates, but when it hits one with 4, it deletes two of them then fails with that error.

Sep 27, 2011 9:56 AM in response to turingtest2

Hmm, so in your case iTunes has a record of the location as say:

<Some Path>/iTunes/iTunes Media/Music/<Artist>/<Album>/## <Name>.<Ext>

instead of :

<Some Path>\iTunes\iTunes Media\Music\<Artist>\<Album>\## <Name>.<Ext>

does it? I guess this could potenentially happen with libraries/playlists migrated from Macs too. I should probably correct for that error earlier in the processing as it might be missing some logical dupes (two entires to same file) with the current code.


tt2

Sep 27, 2011 1:42 PM in response to tcminyard

A second attempt to add the same file will normally be ignored. However if an existing file isn't where it is supposed to be (e.g. external drive offline), and iTunes gives it the exclamation mark, then you can restore the file (e.g. connect the drive) and add it without iTunes detecting that the file is already in the library. Next time you attempt to access the "missing" file, iTunes will find it again, but now you have two files with the same file path aka "logical dupes" or "type 1" as I called them earlier.


I've posted an updated version of the script which will replace "\" for "/" in the paths for the logical dupe detection cycle and when attempting to send a file to the recycle bin so that should cover that issue.


tt2

how to delete duplicated songs all at one time?

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