Replace specific digit in each filename?

Bulk Rename Utility How-To's

Replace specific digit in each filename?

Postby lordpontiff » Wed May 12, 2021 9:35 pm

I was wondering how I should go about this.

Specifically, I want to change the underlined character in each file from a 2 to an 8.

7AB50E44-1ABE787D-5E53A204-C0

I can't just use basic match and replace or translation as many of the files have multiple '2's in them which need to remain unchanged.. But all of the files have the same amount of characters in them.

Thanks...
lordpontiff
 
Posts: 2
Joined: Wed May 12, 2021 9:24 pm

Re: Replace specific digit in each filename?

Postby Luuk » Wed May 12, 2021 10:34 pm

If the 24th-character is always 2, then settings like...
Remove(5) with From=24 and To=24
Add(7) with Insert=8 and At=24
Filters(12) with Name Min/Max=33 (for 3-character extensions)

If the 24th-character is sometimes 2, then RegEx(1) with a Match and Replace like...
^(.{23})2(.{5})$
\18\2
Luuk
 
Posts: 318
Joined: Fri Feb 21, 2020 10:58 pm

Re: Replace specific digit in each filename?

Postby lordpontiff » Sat May 15, 2021 8:50 pm

Awesome, thank you.
lordpontiff
 
Posts: 2
Joined: Wed May 12, 2021 9:24 pm


Return to How-To


cron