# Remove everything before - in \_filename

**URL:** <https://community.mp3tag.de/t/remove-everything-before-in-filename/52404>\
**Category:** Support\
**Created:** [March 17, 2021, 7:03am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404 "2021-03-17T07:03:53Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clayman648](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@Clayman648](https://community.mp3tag.de/u/Clayman648)\
**Post date:** [March 17, 2021, 7:03am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/1 "2021-03-17T07:03:53Z")

</div>

Hey, basically I need a line of code that I can use to remove everything before: - including the space on the right side so I can use do in tag to tag  
Before:  
Shaggy - It Wasn't Me  
After:  
It Wasn't Me  
I can't do %TITLE% becuase  
A) they are both different  
and  
B) that's where I was this information to go

I'm using another program to mass change the titles to a certain layout  
then loading those files into mp3tag and then changing the %title%

Thanks for reading

---

<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:** [March 17, 2021, 7:07am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/2 "2021-03-17T07:07:16Z")

</div>

Did you know that you can set more than one field variable when you import data from filenames?  
So

> [@Clayman648](#):
>
> Shaggy - It Wasn't Me

Could import data with Convert\>Filename-Tag  
Mask: %artist% - %title%

And if you want to get just the last part to go to TITLE, then use  
Mask: %dummy% - %title%

---

<div class="post-metadata">

**Author:** ![Clayman648](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@Clayman648](https://community.mp3tag.de/u/Clayman648)\
**Post date:** [March 17, 2021, 7:27am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/3 "2021-03-17T07:27:26Z")

</div>

> [@ohrenkino](#):
>
> Did you know that you can set more than one field variable when you import data from filenames?  
> So

Thank you for your fast reply!  
in Tag to tag I do  
but i'll now delete my old TITLE and just use your method Thanks!

now i'm just thinking about adding a column that shows just the title from the file name  
and renaming it something like New Title AFTER filename - Tag  
so I can see the differences at a glance

---

<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:** [March 17, 2021, 7:33am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/4 "2021-03-17T07:33:56Z")

</div>

You could import the data from the filename to a user-defined field like e.g. CHECK\_TITLE.  
Then use a filter that shows you all files where TITLE does not equal CHECK\_TITLE:  
`"$if($eql(%title%,%check_title%),1,0)" IS 0`

---

<div class="post-metadata">

**Author:** ![Clayman648](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@Clayman648](https://community.mp3tag.de/u/Clayman648)\
**Post date:** [March 17, 2021, 8:01am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/5 "2021-03-17T08:01:46Z")

</div>

hmm, can I have both methods please?

because I was just going to use the filter and search for individual changes I have applied and imported  
so I can verify manually like that

---

<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:** [March 17, 2021, 8:12am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/6 "2021-03-17T08:12:28Z")

</div>

> [@Clayman648](#):
>
> can I have both methods please

You are free to use whatever you think is suitable.  
Yet, I don't understand what you mean by "both methods".  
If you want to compare 2 strings, it is much easier to have them nice and separated in fields than to cut a piece of data from a longer piece.

---

<div class="post-metadata">

**Author:** ![Clayman648](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@Clayman648](https://community.mp3tag.de/u/Clayman648)\
**Post date:** [March 17, 2021, 8:22am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/7 "2021-03-17T08:22:14Z")

</div>

both methods from your:

CHECK\_TITLE.  
Then use a filter that shows you all files where TITLE does not equal CHECK\_TITLE:  
`"$if($eql(%title%,%check_title%),1,0)" IS 0`

and my:  
Adding a column that shows just the title from the filename  
by adding some code into value

I want to see and understand fully of what and how your suggestion works as well as mine

---

<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:** [March 17, 2021, 8:26am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/8 "2021-03-17T08:26:09Z")

</div>

Yeah, go ahead.  
Do this for a sample file.  
Import some data into CHECK\_TITLE,  
create a column that has %check\_title% as value and field.  
Then compare if really CHECK\_TITLE contains that part that you just imported from the file.  
Then apply the filter and see if the result is convincing.

Perhaps I forgot to mention:  
After you have finished the comparison, you simply delete that user-defined field CHECK\_TITLE as you probably don't need it anymore.

---

<div class="post-metadata">

**Author:** ![Clayman648](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@Clayman648](https://community.mp3tag.de/u/Clayman648)\
**Post date:** [March 17, 2021, 9:00am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/9 "2021-03-17T09:00:26Z")

</div>

hmm, I tried it but the new column ends up dataless  
even when both titles were different

but that's okay because  
a sample I have manually changed the file name from  
3 Doors Down - By my Side  
3 Doors Down - By My Side  
then import (all my changes to files in one hit)  
then go to convert Filename - Tag

The last thing I want to do is add a column with changed %\_filename% in the Value section  
to show: By My Side

So I Can see all the changes in like a list format going down to double check and see what the before and after is going to be.  
I tried it but $cutleft doesn't pickup special characters like "- "

what code is that please?

---

<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:** [March 17, 2021, 9:05am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/10 "2021-03-17T09:05:11Z")

</div>

> [@Clayman648](#):
>
> hmm, I tried it but the new column ends up dataless  
> even when both titles were different

As I don't know what you did to fill the column with data and how the column is defined, I cannot help you.

To separate a string with "`-`" as devider try as value:  
`$regexp(%_filename%,.* - (.*),$1)`  
Leave field empty.

---

<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:** [March 17, 2021, 9:09am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/11 "2021-03-17T09:09:18Z")

</div>

> [@Clayman648](#):
>
> The last thing I want to do is add a column with changed %\_filename% in the Value section  
> to show: By My Side

Did you know that there is an action to change the case of words?  
That relieves you from the task to manipulate every title individually.

---

<div class="post-metadata">

**Author:** ![Clayman648](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/3e96dc/32.png) [@Clayman648](https://community.mp3tag.de/u/Clayman648)\
**Post date:** [March 17, 2021, 9:28am UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/12 "2021-03-17T09:28:49Z")

</div>

That's alright  
This is PERFECT! thank you so much

Yeah because now I can see the differences in the old and current title  
and to see my changes in the file name that I can change in mp3tag

Thank you 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:29pm UTC](https://community.mp3tag.de/t/remove-everything-before-in-filename/52404/13 "2026-02-09T12:29:07Z")

</div>


