Thursday, November 08, 2012

Deleting Duplicate mp3 on Mac

Using Amazon Music I download an album twice. It saved each file twice. One like "song.mp3" and the next as "song(1).mp3".

I wanted to delete all the files ending with "(1).mp3". The easiest way is to use the Mac terminal and  a shell. Here's the steps I took:
Opened Terminal
Change to the Music directory typing: "cd Music/Amazon\ MP3
Then typed: "find . -name  *\(1\)\.mp3"

If the find command listed only all the files I want to delete then I type the next line. But I must be certain because it is not reversible. Okay, are you certain?

Now delete: "find . -name  *\(1\)\.mp3 --delete"

This leaves me with a problem for itunes where there a duplicates.