How to truncate the file names to specified length

Bulk Rename Utility How-To's

How to truncate the file names to specified length

Postby Peter G » Sun Jan 30, 2022 8:18 pm

Hello,

With so rich choice of actions in BRU I can't figure out how I can limit the file names to be not longer than the desired number of characters. Will be grateful for a hint.

In the folder there may be present short names along with the oversized names which should be shortened.
Peter G
 
Posts: 4
Joined: Sun Jan 30, 2022 8:10 pm

Re: How to truncate the file names to specified length

Postby Luuk » Sun Jan 30, 2022 9:30 pm

To keep only the first 20-characters, can either use...

Remove(5) with From==21 and to==999
Regex(1) with Match==(.{20}) and Replace==\1
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: How to truncate the file names to specified length

Postby Peter G » Mon Jan 31, 2022 9:47 am

Oh, thanks! Simple.

(At first it didn't work)
Peter G
 
Posts: 4
Joined: Sun Jan 30, 2022 8:10 pm


Return to How-To