Remove Duplicate Disc Title From Multiple Music Filenames

A swapping-ground for Regular Expression syntax

Remove Duplicate Disc Title From Multiple Music Filenames

Postby Nell » Mon Jun 30, 2014 10:41 pm

I painstakingly have spent hours ripping a CD collection of nearly 20,000 discs over the past few years.
Unfortunately, I have not named everything as I wish I had and have a recurring problem that I would like to remedy.
I'm hoping someone can help as I have no idea what I am doing with "regular expressions".

Currently, I have around 100,000 filenames that look like this:

    Black Box - Everybody, Everybody - 01 - Everybody, Everybody (Love Unlimited edit)
    Black Box - Everybody, Everybody - 02 - Everybody, Everybody (Le Freak mix)
    Robin S - Show Me Love - 01 - Show Me Love (Montego Mix)
    Robin S - Show Me Love - 02 - Show Me Love (Dub Mix)
    Robin S - Show Me Love - 03 - Show Me Love (New York Mix)

and I would like to change them to:

    Black Box - Everybody, Everybody (Love Unlimited edit)
    Black Box - Everybody, Everybody (Le Freak mix)
    Robin S - Show Me Love (Montego Mix)
    Robin S - Show Me Love (Dub Mix)
    Robin S - Show Me Love (New York Mix)

Any help would be greatly appreciated! The only catch is that some file names are already named correctly, so a decision has to be made when looking at each filename.

Thanks for any advice!
Nell
 
Posts: 5
Joined: Tue Jun 03, 2014 2:20 am

Match Repeating Duplicate Text

Postby truth » Tue Jul 01, 2014 11:39 am

1Regex match/replace
^(.+ - ?)(.+?) - \d+ - \2( \(.+\))$
\1\2\3

It mandates - # - inbetween the repeating-text
So it wont touch names already in the correct format
(no need to worry about which files to select).
truth
 
Posts: 221
Joined: Tue Jun 25, 2013 3:39 am
Location: Earth, OrionArm, MilkyWay

Re: Remove Duplicate Disc Title From Multiple Music Filenames

Postby Nell » Tue Jul 01, 2014 4:44 pm

wow, thank you so much!

Works flawlessly :)
Nell
 
Posts: 5
Joined: Tue Jun 03, 2014 2:20 am


Return to Regular Expressions