Replace the first x characters or others

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

Replace the first x characters or others

Postby SoCu » Fri Jun 05, 2026 3:13 pm

Hello, how can I replace the first characters with numbers that increase.

For example, the files are ordered by number, but they are not correlative.

01. name of the file.mp4
03. name of the file.mp4
07. name of the file.mp4
33. name of the file.mp4
51. name of the file.mp4

and I would like to rename or change the first 3 characters for other numbers that start with 1 and increase

01. name of the file.mp4
02. name of the file.mp4
03. name of the file.mp4
04. name of the file.mp4
05. name of the file.mp4

I have tried removing the first characters from:
Regex(1)
Match: (^.{3})(.*)
Replace: \2

But then I don't know how at the same time, without the files changing position when deleting the numbers, I can add the others.

Can someone help me configure BRU for this task?

Thank you.
SoCu
 
Posts: 13
Joined: Mon Dec 15, 2025 6:20 pm

Re: Replace the first x characters or others

Postby therube » Fri Jun 05, 2026 4:43 pm

You could do something like:

5:Remove -> First: 2
10:Numbering, Mode: Prefix, Start: 1, Pad: 2
therube
 
Posts: 1474
Joined: Mon Jan 18, 2016 6:23 pm

Re: Replace the first x characters or others

Postby SoCu » Fri Jun 05, 2026 5:16 pm

Great, yes, thank you very much.

There are a few details that will need to be manually renamed later, but they are minor.

For example, my intention is to remove the period after the first two characters; in this case, I've changed it to:

Remove(5)
First: 3

But in some cases, the space after the period is removed.

Image

But as I said, this isn't very important; they can be renamed manually.
SoCu
 
Posts: 13
Joined: Mon Dec 15, 2025 6:20 pm

Re: Replace the first x characters or others

Postby TheGhost78 » Sat Jun 06, 2026 1:44 am

Instead of

Remove (5):
First: 3

Use

RegEx (1):

Match:
\d{2}\.?( .+)
Replace:
\1
TheGhost78
 
Posts: 262
Joined: Fri Jul 19, 2024 11:25 am

Re: Replace the first x characters or others

Postby SoCu » Sat Jun 06, 2026 7:16 am

Okay, now they're all being renamed at once.
Honestly, it drives me crazy trying to extract those codes in RegExt, :shock: :o :D but the fact is, they work.

Thanks.
SoCu
 
Posts: 13
Joined: Mon Dec 15, 2025 6:20 pm


Return to Suggestions