Remove Part of the File name, after the "-"


#1

Hi,

Can you help me with Regular Expressions? I want to remove part of the file name after the dash "-" e.g. Depeche Mode - People Are People should become just Depeche Mode. I figured out the way to do it with single words e.g. Europe - Carrie (becomes Europe) but it does not work with 2-worded bands.
And also how would i do it the other way around, meaning to remove the band before the "-" but leave the song title (e.g. Depeche Mode - People Are People should become just People Are People)?
Any help is much appreciated.

Peter J.


#2

Use the converter "Filename - FIlename".
Enter as mask for the original filename:
%1 - %2
Enter as mask for the target filename (if you want to keep the first part):
%1
Enter as mask for the target filename (if you want to keep the second part):
%2

The Preview function in the dialogue should give you a hint whether the mask fits.


#3

Thanx ohrenkino!

It does the trick for me. Really appreciate you taking the time to solve this.


#4

On a similar note can I do something similar for a tag field, such as album?
Obviously I can do a regular Exp, but didn't want to miss something simpler like above.

For example I have Album with something like this:

Year - Conductor - Album Name

I want to convert it to JUST the album name and get rid of the "Year - Conductor - " part.

Thanks!!!!!!!!!!!!!

I was using GUESS VALUES with

%album%
to
%year% - %conductor% - %album%


What I didn't like is that it replaced my year and conductors with that, I'd rather keep my values, I was hoping for something like %dummy% - %dummy% - %album%.

thanks.


#5

I am afraid not.
Or - you could do a "Replace with Regular Expression"
Input-Mask:
.* - (.*)
Replace string:
$1
This should get rid of everything up to the last hyphen.


#6

Great one!! Very simple, thanks so much.