How to Cutright from a char str: can't get it work

Picard just automatically just trashed all my File Names and added rubbish at the end of each file name without so much as a say-so. it did other damage as well, but i am/have fixed most of that.

i have worked out that the last valid string at the end of every file name is "(NORM)"

see attached example

so i want to truncate the file name from that to the rhs end of file name

but do you think i can work out a way that actually works!

i played with $left and $cut right and $strstr, but i couldn't get anything to actually work

can someone show me a regex string that works? :slight_smile:

Try Convert>Filename-Filename
Old filename pattern: %1 (NORM) %2
New filename pattern: %1 (NORM)

1 Like

ok. ty,

i get that, although i have not used before

let me give that try

but, why didn't using cutright and strstr work?
ie something like this which is about the same as what i was trying ...


Has the converter worked?

You don't explain what did not work.
Have you checked which position `

returns and how many characters from the right that would be?

I tried to explain the basic behaviour of $cutright() in this post for you:

You would have to calculate either how many characters you want to keep and use $left() or how many characters you would have to include if you want to cut off a part of a string from the right.
And if you want to find a variable position in a string and use $cutright() (instead of $left()) then you have to subtract that position from the total length of the string.

i can see i did not explain fully the detals of what i could see myself

this length text string is embedded in say Title and/or Filename

so .... (1324) ... say

the problem always seems that the leading chars are always a variable length (because they include the artist & track names)

and the text after artist/title are not consistent or the same length either

this is starting to look like Mission Impossible :slight_smile:

all we know that there IS a string '(****min)' in the name

i see this is better covered in other Topic?

The converter can look for a constant string at a variable position.

And otherwise in general: the more of the original data is visible, the closer the suggestions will be to a solution - because I do not feel included in

as I don't know what data you are talking about.

i post in other Topic

What about an answer to the questions and suggestions?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.