Remove numeric suffix, replace with numeric suffix

Bulk Rename Utility How-To's

Remove numeric suffix, replace with numeric suffix

Postby Macker » Wed May 24, 2023 3:16 pm

Hi all,

I've got an issue where I've got a LOT of files that need re-numbering.

Bit of explanation behind it: I work in 3D/animation and the client wanted the animation to be half the length - so simplest solution was to render every nth frame. Perfect.

The problem is that my video editing software doesn't recognise every nth frame and requires everything to be numbered sequentially.

So I need my current file names that look like this:

0052_Main_Frames_.RGB.00700.tif
0052_Main_Frames_.RGB.00702.tif
0052_Main_Frames_.RGB.00704.tif
0052_Main_Frames_.RGB.00706.tif

To look like this:

0052_Main_Frames_.RGB.00700.tif
0052_Main_Frames_.RGB.00701.tif
0052_Main_Frames_.RGB.00702.tif
0052_Main_Frames_.RGB.00703.tif

And you know what the craziest part is? I've *literally done this before* using BRU but cannot for the life of me remember how I did it.

Any help is much appreciated.

Kind regards,
Chris
Macker
 
Posts: 2
Joined: Thu Nov 05, 2020 11:31 am

Re: Remove numeric suffix, replace with numeric suffix

Postby Macker » Wed May 24, 2023 3:18 pm

No sooner had I posted this I think I cracked it.

Remove (5) Last n = 3 and numbering (10) = suffix start 700 increment 1
Macker
 
Posts: 2
Joined: Thu Nov 05, 2020 11:31 am

Remove trailing numbers and reorder

Postby Luuk » Wed May 24, 2023 9:02 pm

Greetings Chris, this solution can work perfectly, for when there is less than 300-frames.
It might only to be a problem to anyone when there is more than this, so renaming like...

0052_Main_Frames_.RGB.00700 --> (same)
0052_Main_Frames_.RGB.00702 --> 0052_Main_Frames_.RGB.00701
0052_Main_Frames_.RGB.00704 --> 0052_Main_Frames_.RGB.00702
(300-files)
0052_Main_Frames_.RGB.01304 --> 0052_Main_Frames_.RGB.011002

If this to be a problem, can use the RegEx(1) instead of Remove(5) to remove all of the trailing-digits.
So with a checkmark inside for "v2", the "Match" can look something like... (\G(?!^)|.*RGB\.)\K\d+$
A simpler match can look something like \d+$ but this can remove trailing-digits from any name.

An easier way to edit, without having a checkmark for "v2" can be a "Match" and "Replace" something like...
(.*\.RGB\.)\d+$
$1

So then, its just using "Pad" inside of Numbering(10) to decide how many minimum-digits should be used for the numbers.
The good part for combining your settings with RegEx(1) is that it can also fix any names that got numbered incorrectly.
But your solution is perfect, unless there is very, very many frames.
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm


Return to How-To