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
.
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.
The $cutRight(x,n) and $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
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...
This would result in a filename like: 01. Abba - Waterloo.mp3
Or just reduce the format string to your example %ARTIST%
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