the fix is simple enough logically - i simply wanted too truncate the Title by 65 chars ie removethe last chars of title
- of course with data like this the Title length ie $len is totally variable so no fixed parameters can be used
- there is no simple $truncate function
- NONE of $left, $mid, or $cutright would work with $len to remove the last 6 chars
see various attached examples
- if i used $len with another PH, eg Artist, it worked, ie, if i wanted, i could truncate the Title by the length of the Artist field, which is fine - if you want to do that
- but if you want to take a fixed number of the length to KEEp ie in this case Title Length - 6, no combination would work
- it just didn't do anything, ie THIS is what would not work ... eg %title, $len(%title)-6. as per attachments, no matter which function i used
- as i think i might have said before, a $TRUNC(x,n or field) function would be so much eaisr
PS i find i have to be ultra careful because i am using MP3Tag and AIMP Tag Edfitor and Bulk Rename Utility, simultaneously, and the PH and functions are very similar - but different. very easy to get them mixed up when using
, the '-6' would not work
To subtract values, use $sub()
See the documentation:
You write in the topic title, that
$cutright does not work for you.
If I try it with your mentioned track title
Twenty Tiny Fingers (Alma Cogan) (The Fabulous Fifties - Thest of the Fab 50s) (2005) (144kbits)158453
I get this in the preview of Convert Tag->Tag
Why should this not work for you?
From the already linked documentation:
If you want to solve it with an Action, you could try "Format value":
If you need to cut a variable number of characters with the length of ARTIST, this would work too:
(this example assumes, that the current content of ARTIST has 6 characters)
Usually, a TRUNC function only returns a number truncated to a specified number of digits.
It is not applicable to text in most variants.
$cutLeft(x,n) scripting functions of Mp3tag does exactly what you are looking for:
Removing the last or first
n characters of the string
x = returning the "truncated" string
this might help me.
let me check. i have tried sooo many variations ...
now on this ppint, i was trying something, but was apparently stymied because it didn't take a PH variable .... let me find that to show you,
and so the next thing was how to achieve the desired result without using a PH directly...
i will come back and paste image
so what do you do instead?
Please don't cross-post!
(You have already asked the same in this thread)
Use an action "Format value" to rename your track filenames.
Don't use "Replace" as @poster already told you.
Use a format string with something like this:
$num(%TRACK%,2). $cutRight(%ARTIST%,9) - %TITLE%
This would result in a filename like:
01. Abba - Waterloo.mp3
Or just reduce the format string to your example
if you only want to see the full content of ARTIST as your new track filename.
For my above example this would result in this trackname:
Abba and more.mp3