I want to be able to trim part of a dynamic file path from the right (the end of the string).

Maybe
[RTRIM]count,target[]
so
[RTRIM]6,[album][]
would turn
"The Wall, CD 1" in to "The Wall"

Perhaps more generally, a regex engine could be included?

[REGEX]pattern,target[]
so
[REGEX]s/, CD \d+//[album][]
would turn
"The Wall, CD 1" in to "The Wall"

Or maybe
[REGEX]match pattern, substitution pattern, target[]
so
[REGEX](.*), CD \d+,$1,[album][]

Hmm, the ',' inside those examples might cause issues, and the [] characters are often used in regexes too. I think I've talked myself out of that idea!