Reordering filename and adding a leading zero if not present

Bulk Rename Utility How-To's

Reordering filename and adding a leading zero if not present

Postby bitzie » Wed Aug 30, 2023 5:57 pm

Hi,

I have a ton of files that I need to reorder the names of as well as adding a leading zero if it's not there. Unfortunately, the filenames are not consistent as far as the number of characters per "section." For example, two files look like this:

1. Ballet Rehearsal-Edgar Degas.tif
33. Shot Marilyns-Andy Warhol.tif

What I would need them to be out put as is:

01_Degas_Edgar-Ballet_Rehearsal.tif
33_Warhol_Andy-Shot_Marilyns.tif

Thanks!
bitzie
 
Posts: 1
Joined: Wed Aug 30, 2023 5:29 pm

Insert lead-zero if needed

Postby Luuk » Wed Aug 30, 2023 7:03 pm

With RegEx(1) with having a checkmark for "v2", the "Match" and "Replace" can be like...
^(\d)\. (?X)^(\d\d)\.\x20
0$1_(?X)$1_
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm


Return to How-To