How to rename a file with 2 consecutive numbers

Bulk Rename Utility How-To's

How to rename a file with 2 consecutive numbers

Postby Nostal4 » Wed Nov 10, 2021 6:46 pm

Hello! So I know that you can add numbers as pre or sufix on your filename:

folder with (file_name.jpgs) -> file_name_01, file_name_02, file_name_03...

I wanted to know if there's a way for the name to have two consecutive numbers at the same time, which then increase by one on the next file:

folder with (file_name.jpgs) -> file_name_01_02, file_name_03_04, file_name_05_06...

Hope somebody can help me with this, thanks!
Nostal4
 
Posts: 2
Joined: Wed Nov 10, 2021 6:38 pm

Re: How to rename a file with 2 consecutive numbers

Postby Luuk » Wed Nov 10, 2021 9:17 pm

The easy way is to conduct 2-different renames, so the first rename using Numbering(10) settings like...
Mode==Pre.+Suff., Start==1, Pad==2, Incr.==2, Sep.==_ and a checkmark in 'Folder' if conducting many subfolders??
So then renaming like...
01_file_name_01.jpg
03_file_name_03.jpg
05_file_name_05.jpg

After this renaming, first press 'F5', then change Start==2 and Mode==Suffix, with RegEx(1) Match and Replace like...
^\d+_(.+)
\1
So then renaming like...
file_name_01_02.jpg
file_name_03_04.jpg
file_name_05_06.jpg

This can also be conducted with only one rename, but it does require the commercial license for using the javascript.
The first Mode uses Pre.+Suff. so that 'F5' wont make the names list out of order for the next rename.
But you might also like using a higher Pad, especially if there can be more than 50 files inside a folder.

Also, if you only need to conduct certain files, the renames could include a Filters(12) "Mask" like *.jpg
The you just click the blue-arrows beside Mask to filter the other files away from inside of the file-list.
Luuk
 
Posts: 690
Joined: Fri Feb 21, 2020 10:58 pm

Re: How to rename a file with 2 consecutive numbers

Postby Nostal4 » Wed Nov 10, 2021 10:18 pm

Luuk wrote:The easy way is to conduct 2-different renames, so the first rename using Numbering(10) settings like...
Mode==Pre.+Suff., Start==1, Pad==2, Incr.==2, Sep.==_ and a checkmark in 'Folder' if conducting many subfolders??
So then renaming like...
01_file_name_01.jpg
03_file_name_03.jpg
05_file_name_05.jpg

After this renaming, first press 'F5', then change Start==2 and Mode==Suffix, with RegEx(1) Match and Replace like...
^\d+_(.+)
\1
So then renaming like...
file_name_01_02.jpg
file_name_03_04.jpg
file_name_05_06.jpg

This can also be conducted with only one rename, but it does require the commercial license for using the javascript.
The first Mode uses Pre.+Suff. so that 'F5' wont make the names list out of order for the next rename.
But you might also like using a higher Pad, especially if there can be more than 50 files inside a folder.

Also, if you only need to conduct certain files, the renames could include a Filters(12) "Mask" like *.jpg
The you just click the blue-arrows beside Mask to filter the other files away from inside of the file-list.


Thanks a lot, even if a bit inconvenient for having to rename it two times, it works just fine for what I wanted.
Nostal4
 
Posts: 2
Joined: Wed Nov 10, 2021 6:38 pm


Return to How-To