Mass-Delete Duplicate mp3 files

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
PeterLairo
Junior Member
Junior Member
Posts: 4
Joined: 2009-12-23, 16:10 UTC
Location: Germany

Mass-Delete Duplicate mp3 files

Post by *PeterLairo »

For some reason most of my mp3 song files are duplicated on my hard drive. The files are all in the form "filename.mp3" and the duplicates are "filename #.mp3" (i.e., appended a space and a number). An example:

Lunch Lady.mp3
Lunch Lady 1.mp3
Lunch Lady 3.mp3

I cannot figure out how to do a search (ALT+F7) or Multi-Rename (CTRL+M) to select all the duplicates. I can't figure out how to do a search on "<space>1.mp3". I've tried combinations of [N-1-] in Multi-Rename without any luck. :(

Could someone please help me? :?:

BTW: I use iTunes to import and arrange the songs, and the open source Songbird to play them.
Regards,
Peter Lairo
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

ALT+F7 (Search)
Search for: " 1"
(without quotes)

On the [Advanced] Tab:
Find Duplicates

Try checking [x] same size [x] same contents

You don't need to actually put any text into the "Search for" field, it can be blank.

Once any duplicates are found, shift+ [Feed to listbox]
From there you can select files and use multi-rename tool.

One of Ghisler's File plugins can display file (names) with sub-strings. You would create a Custom Column to do so. I don't have my machine atm, and I don't recall which it is offhand.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
PeterLairo
Junior Member
Junior Member
Posts: 4
Joined: 2009-12-23, 16:10 UTC
Location: Germany

Post by *PeterLairo »

Balderstrom wrote:ALT+F7 (Search)
Search for: " 1"
(without quotes)
Thanks for the suggestion. Unfortunately, it also catches many instances where there is a legitimate " 1" in another location in the filename.

When I search for " 1.mp3", I get no results. :cry:

Is there a way to search for " 1.mp3"?
Regards,
Peter Lairo
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

Maybe there is no need, just switch on duplicate detection what was already been suggested:
On the [Advanced] Tab:
Find Duplicates
Ambiguity succeeds where honesty dares not venture.
User avatar
PeterLairo
Junior Member
Junior Member
Posts: 4
Joined: 2009-12-23, 16:10 UTC
Location: Germany

Post by *PeterLairo »

frenky wrote:Maybe there is no need, just switch on duplicate detection what was already been suggested:
On the [Advanced] Tab:
Find Duplicates
Thanks for your suggestion, but I don't see how that would help. Using that method, I do get a list of duplicates. But what do I do then? I don't want to got through the list and delete 2000+ interspersed duplicate files by hand. I'm also not sure how the Multi-Rename tool would help me auto-delete all those dupes (it doesn't seem to have a "delete" function). :?

Am I overlooking something?
Regards,
Peter Lairo
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

I think you did not miss anything.
I doubt that Ghisler implemented "auto delete" option. From reading this forum now for several years he appears very cautious about this type of actions. Can't say I'm not in agreement with him on this topic.

But, I use this option on few files seldom and I delete files I want by hand so I may have missed something.

On the other hand if you are sure for the file names, you could try regex search.
Alt+F7, check "RegEx" and for search string try

Code: Select all

.*[ ][1-9].mp3
This will match:
Lunch Lady 1.mp3
Lunch Lady 2.mp3
...
Lunch Lady 8.mp3
Lunch Lady 9.mp3
Ambiguity succeeds where honesty dares not venture.
User avatar
PeterLairo
Junior Member
Junior Member
Posts: 4
Joined: 2009-12-23, 16:10 UTC
Location: Germany

Post by *PeterLairo »

frenky wrote:try regex search.
Alt+F7, check "RegEx" and for search string try

Code: Select all

.*[1-9].mp3
That seemed to work! Thank you very much!!! :D

BTW: Could you please explain to me what[face=courier] .*[1-9].mp3[/face] means (particularly: why it starts with a period and also the "[face=courier][1-9][/face]")? And why was selecting RegEx necessary? What does RegEx do? I'd love to learn.
Regards,
Peter Lairo
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

PeterLairo wrote: BTW: Could you please explain to me what[face=courier] .*[1-9].mp3[/face] means (particularly: why it starts with a period and also the "[face=courier][1-9][/face]")? And why was selecting RegEx necessary? What does RegEx do? I'd love to learn.
Please note that I've edited a post a bit.

Code: Select all

.*[ ][1-9].mp3
What it does.
".*" matches any number of any type of characters
"[ ]" == space
"[1-9]" is any number (but only one number) in range from 1 to 9
"." means any single character
"mp3" means "mp3" :)

So, match anything up to a first space followed by any single digit number in range from 1 to 9 that is followed by any single character and "mp3" string.

E.g.
This would match:
"anything 2bmp3"
as well as
"Lunch Lady 1.mp3"
So you have to be careful with regex...
But for regex, there are many tutorials online.
Ambiguity succeeds where honesty dares not venture.
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

If I did this regex now, i would probably write:

Code: Select all

.*[ ][1-9]\.mp3$
Ambiguity succeeds where honesty dares not venture.
vernados
New Member
New Member
Posts: 1
Joined: 2010-10-25, 16:57 UTC

find duplicates

Post by *vernados »

I’m sure that Clone Remover will be the best assistant for you. It is an award-winning small shareware utility to find duplicate files and to remove duplicate files. It will help you search duplicate files. Try it.
This is website moleskinsoft com
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Outside of the realm of MP3s or images, for most intents and purposes, people do NOT need another tool to detect duplicate files.

For MP3s - if you haven't ripped and tagged your own CDs, then you should be using a MP3 Tag Editor, like Tag Scanner or Mp3tag. Make sure your MP3s are tagged properly, then rename them ALL based on the tags -- then find duplicates with TC (by Name, not content). Generic matching by content for MP3s generally wont work, as they have slightly different tags in the mp3 header and or a different image/cover - or no cover at all AND different names.

In the OP's case, the files were actual duplicates, so just sorting by a regex and using TC's match duplicates would work just fine.

The other major case that people might need to find duplicate files would be with Images, and neither TC nor a generic file find duplicates tool would be of any use whatsoever.

For images one might look at VisiPics, or Dupe Detector. As well Picasa and other multimedia management tools have built-in heuristics for matching duplicates. Personally I can't stand picasa - but that's another story.
Phred
Senior Member
Senior Member
Posts: 382
Joined: 2009-06-16, 15:24 UTC
Location: SEAu

Post by *Phred »

TC seems to be able to do most of what moleskinsoft's Clone Remover does, and Everything can sort by file size.
Post Reply