I am trying to clean up my iTunes. I have a lot of duplicate files (* 1.mp3 or * 1.m4a). I want to make sure before I find/clean the duplicates ending in ' 1' that they are truly bit-for-bit duplicates of the files not ending in ' 1'. Many are downloaded from iTunes match and want to make sure I'm not deleting a complete file and keeping a partially delete file (if, somehow an error had occurred that interrupted the download), etc.

I'm sure there is a script that can compare the 2 files and delete the ' 1' if it is identical to the original but don't know how to write something like that.

I would want it to go through my Music folder recursively.

  • The command you want is cmp to compare files. The script is slightly complex as it needs to find two or ,pre files and relate by name then compare - I would look into a scripting language (or use iTunes) – user151019 Aug 23 '14 at 16:07

Use iTunes as per Apple's note

Choose View > Show Duplicate Items to show duplicate items (matches are based on the song name and artist).

Duplicate items will be sorted next to one another. Review each item to determine which one you'd like to remove from your library. You can compare the track length, date added, genre, play count, size, bit rate, and more to help you determine which item you'd like to keep and which item you'd like to remove.

Then choose the item to delete and hit the delete key

There are apps that automate more of this e.g. Dupin

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .