How to remove " 01" from file name

Bulk Rename Utility How-To's

How to remove " 01" from file name

Postby NinJar » Tue Sep 14, 2021 5:21 am

Hi all, thanks in advance for any help! I recently copied a large amount of files 10,000 plus to a folder expecting to overwrite the files inside with the new ones, but instead, all the new ones were added with a " 01"(a space and then digits 01). So what i need to do take all the files in the folder that have the " 01" and remove that part and then over write the existing file with the name. the file name format is a string of numbers from 4 to 7 digits long like this

1234 or 1234567

and now i have a bunch of duplicates that are mixed in and look like this
1234 01 or 1234567 01

So in summary I need to remove the " 01" and copy that file over the old file. thanks very much for your help!
best regards,
J
NinJar
 
Posts: 2
Joined: Tue Sep 14, 2021 5:13 am

Re: How to remove " 01" from file name

Postby Luuk » Tue Sep 14, 2021 12:52 pm

First to put a checkmark inside for the menu... "Renaming Options, Advanced Options, Allow Overwrite".
To remove " 01" at the end of those filename-formats, the RegEx(1) can use a 'Match' and 'Replace' like...
^(\d{4,7}) 01$
\1

After everything does get renamed, I do then always first remove this checkmark before exiting the bru.
Then I exit and immediately restart the bru, just to make sure this checkmark setting was never saved.
Because this can be a very dangerous setting, if not aware ahead of time!
Luuk
 
Posts: 318
Joined: Fri Feb 21, 2020 10:58 pm

Re: How to remove " 01" from file name

Postby NinJar » Wed Sep 15, 2021 4:04 am

Thanks very much for the help, will give it a shot!
NinJar
 
Posts: 2
Joined: Tue Sep 14, 2021 5:13 am


Return to How-To