I guess my main question would be, What is your real goal here? Simply lopping off anything past the "Nth" character could easily result in having multiple files having the same name. To re-use your example, suppose you had
Code:
"ThisFileIsJustWayTooLongAndReallyNeedsToBeShortened_Track_1.mp3"
"ThisFileIsJustWayTooLongAndReallyNeedsToBeShortened_Track_2.mp3"
"ThisFileIsJustWayTooLongAndReallyNeedsToBeShortened_Track_3.mp3"
....
Using the truncation approach, they'd all become "ThisFileIsJustWayTooLongAnd.mp3" and that wouldn't work.
Can you provide the background as to why this operation is necessary, or what the update is intended to accomplish?