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

**URL:** https://community.mp3tag.de/t/remove-part-of-the-file-name-after-the/12965
**Category:** Support
**Created:** [January 20, 2012, 3:08am UTC](https://community.mp3tag.de/t/remove-part-of-the-file-name-after-the/12965 "2012-01-20T03:08:42Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![monet60707](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9d8465/32.png) [@monet60707](https://community.mp3tag.de/u/monet60707)
#### Post date: [January 20, 2012, 3:08am UTC](https://community.mp3tag.de/t/remove-part-of-the-file-name-after-the/12965/1 "2012-01-20T03:08:42Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [January 20, 2012, 4:57am UTC](https://community.mp3tag.de/t/remove-part-of-the-file-name-after-the/12965/2 "2012-01-20T04:57:46Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![monet60707](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9d8465/32.png) [@monet60707](https://community.mp3tag.de/u/monet60707)
#### Post date: [January 20, 2012, 4:06pm UTC](https://community.mp3tag.de/t/remove-part-of-the-file-name-after-the/12965/3 "2012-01-20T16:06:13Z")

</div>

> [@ohrenkino](#):
>
> 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.

Thanx ohrenkino!

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

---

<div class="post-metadata">

### Author: ![camelx](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/94ad74/32.png) [@camelx](https://community.mp3tag.de/u/camelx)
#### Post date: [January 21, 2012, 6:34pm UTC](https://community.mp3tag.de/t/remove-part-of-the-file-name-after-the/12965/4 "2012-01-21T18:34:58Z")

</div>

> [@monet60707](#):
>
> Thanx ohrenkino!
> 
> It does the trick for me. Really appreciate you taking the time to solve this.

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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [January 21, 2012, 6:43pm UTC](https://community.mp3tag.de/t/remove-part-of-the-file-name-after-the/12965/5 "2012-01-21T18:43:19Z")

</div>

> [@Steve Holiday](#):
>
> 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 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.

---

<div class="post-metadata">

### Author: ![camelx](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/94ad74/32.png) [@camelx](https://community.mp3tag.de/u/camelx)
#### Post date: [January 21, 2012, 7:40pm UTC](https://community.mp3tag.de/t/remove-part-of-the-file-name-after-the/12965/6 "2012-01-21T19:40:15Z")

</div>

> [@ohrenkino](#):
>
> 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.

Great one!! Very simple, thanks so much.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:23pm UTC](https://community.mp3tag.de/t/remove-part-of-the-file-name-after-the/12965/7 "2026-02-09T12:23:35Z")

</div>


