Filename remove double string

just a simple action but dont know how.

rename filename from example
to this

many thanks for a fast solution

Try Convert>Filename-Filename
Mask over file name: %1_%2_%3
Maks for new file name: %1_%2

thanks for fast reply
in german i tried ersetzen and ersetzen mit but nothing happens, maybe string or mask failures ?
Screenshot 2023-09-01 203403

In German it is Konverter>Dateiname-Dateiname - no action

find the comand but its ot working

as this function has a preview you should see how and where the patterns match.
If you are not sure, then please provide a screenshot of a real filename as every space character and other characters counts.

can this be made as a action comand ?
my failure was there were more things to consider this works


i have many with differett amount ofunderlines
so i have to separate all to the right amont or is there another way to delete the last number

How often will this happen in the life of a file?
And with a look at the problems that arose initially, wouldn't it be better to control the treated files with a filter?
%_filename% MATCHES ".*_\d+_\d+$"

Then you could create an action of the type "Replace with regular expression" for _FILENAME
Search string: (.*_\d+)_\d+$
Replace with: $1

This expression only looks if there are 2 elements consisting of numbers at the end - it does not look whether they are the same.

i dont know how often the bug will hold on.
momentary have 160 tunes with that bug and next time more.
i will test it the next days and thank you really very very much for your help and i think if its replace the last number it will make my solution.
i hope i will understand the commands :slight_smile:

I would still use the converter as you can control better what happens to the data - an action is executed more or less in the background.
But you will find the best way for you.

Screenshot 2023-09-01 203403
i tried it but doesnt work
the filter i didnt use because they are like this

And here is the counter example:

But you could try
Regular expression: (.*_\d+)_\d+

the tag tag is not good because i dont want to change the tag, even the tag is okay, just the filename is wrong.
if you have an idea how to change it all with an action command to delete the last number in the filename it would be awesome.

Have you tried the last suggestion?

which is a little different to
Regular expression: (.*_\d+)_\d+$

yes i tried both but nothing happens


I still see the $ at the end of the regular expression - what happens if you delete that?

i replied that i tryed both variants
but nothing happens :frowning:

Are you sure that you try it on the track with the filename

@ohrenkino's regular expression
works fine here:
Could it be that your underscore is not a real underscore, just a character that looks like this?

Please copy your filename from Windows File Explorer in this webpage:
There you can see every single character and also if your underscore is a "real" underscore.

A real underscore would appear as "LOW LINE" on the linked analyzing webpage:

With the data that you have supplied that result is not plausible.
And as it seems to be rather tricky to maintain an action that works so clandestine, I would prefer the Converter>Filename-Filename as that shows immedidately if the expression leads to success or not.

Or an alternative: rewrite the whole filename with Converter>Tag-Filename and
Format string: %artist%_%numberfield%
(where you have to replace %numberfield% with the real fieldname)

a big big hug to ohrenkino and LyricsLover :+1: :+1:
as we expected the failure was on my side :cry:
through several times watching the vid, but couldn't pause to see
i discovered a little difference in the command with a space at start :sob:
it works perfect now :smiley: :smiley:

one question to the add with numberfield.
i was thinking about that, but i dont know if its hidden in the tags or only in the filename,
how can i check that ? its called id number from the platorm side