Renumber Files In Middle Of Filename

Bulk Rename Utility How-To's

Renumber Files In Middle Of Filename

Postby trg » Mon Oct 24, 2022 3:17 pm

Should be easy (hopefully):
The numbering is in brackets() and I have to insert a file(s) and want the subsequent numbers renumbered.

From:
Same (001) Christmas.jpg
Same (002) Lake.jpg
Same (003).jpg
Same (004) November 1999.jpg
Same (005) Jan 2005.jpg
etc,

To:
Same (001) Christmas.jpg
Same (002) Lake.jpg
Same (003).jpg
Same (004) NEW INSERT.jpg
Same (005) November.jpg
Same (006) Jan 2005.jpg
etc

I can do this in two passes:
- Using Numbering and Remove (Really time consuming)
- Going through and fixing duplicates

Was wondering if there was simple code that could make this job easier? Just change the numbering inside the brackets and renumbers subsequent files? The rest of the filename stays the same and the beginning part of the filename is always the same.
trg
 
Posts: 2
Joined: Mon Oct 24, 2022 2:45 pm

Resume numbering after inserting non-numbered file?

Postby Luuk » Tue Oct 25, 2022 5:25 am

Are you describing that Same NEW INSERT.jpg ===> Same (004) NEW INSERT.jpg ??
Why should it steal the (number) from November, instead of some other filename ??
Should the November-files always lose their years, or is the new-name just a typo ??

So if Im understanding the descriptions, can try conducting the settings like...

Filters(12) with a checkmark inside for "RegEx" and a "Mask" like... ^Same.*
Regex(1) with a checkmark inside for "v2", with a "Match" like ^Same( \(\d{3}\))? and "Replace" like :
Replace(3) with a Replace like :
Numbering(10) with Mode==Prefix, Start==1, Pad==3, and Sep.==Same (:)


If wanting the new-insert to get November's (number), drag it to just above November, then re-select all of your files.
With javascript its much easier, but otherwise its needing these different settings, and always re-typing "Same".
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Renumber Files In Middle Of Filename

Postby trg » Tue Oct 25, 2022 2:55 pm

Thank you.
trg
 
Posts: 2
Joined: Mon Oct 24, 2022 2:45 pm


Return to How-To


cron