renumbering files

Bulk Rename Utility How-To's

renumbering files

Postby mr_purr » Sat Aug 27, 2022 8:40 pm

I have files that are numbered like (1) (10) (100) in that pattern and I want to rename them to 001 010 100. What would be the easiest way

Thanks
mr_purr
 
Posts: 3
Joined: Sat Aug 27, 2022 8:35 pm

Change numbering format

Postby Luuk » Sat Aug 27, 2022 9:07 pm

This can depend on where the (numbers) is located, and also if multiple (numbers) should also be changed?
Luuk
 
Posts: 771
Joined: Fri Feb 21, 2020 10:58 pm

Re: renumbering files

Postby mr_purr » Sun Aug 28, 2022 6:59 am

The files look like this
xxxxxxxx xxx xx (1).jpg
where the numbers are from 1 to at least 100, I know how to get rid of the () all ready
mr_purr
 
Posts: 3
Joined: Sat Aug 27, 2022 8:35 pm

Change numbering format

Postby Luuk » Sun Aug 28, 2022 9:53 am

Is space to always be the separator for (numbers) at the end?? And should they be changing like?...
Name (1).txt =====> Name-001.txt
Name-(10).txt ====> Name-010.txt
Name_(100).txt ===> Name-100.txt

If the answers is being yes? then Regex(1) can use a checkmark in "v2", with a "Match" and "Replace" like...
[- _]?\((\d+)\)$(?X):0+(?=\d{3,})
:000000000$1(?X)-

Can increase "3" up to "9 " for more padding (or add more zeroes in the bottom for 10-or-more).
Can omit or change the "-" to change your preferred separator.
Luuk
 
Posts: 771
Joined: Fri Feb 21, 2020 10:58 pm

Re: renumbering files

Postby mr_purr » Sun Aug 28, 2022 7:39 pm

Thanks that worked.
mr_purr
 
Posts: 3
Joined: Sat Aug 27, 2022 8:35 pm


Return to How-To


cron