How to rename file from ABC_1234 to 1234_ABC?

Post any Bulk Rename Utility support requirements here. Open to all registered users.

How to rename file from ABC_1234 to 1234_ABC?

Postby developer » Fri Dec 24, 2010 6:08 am

Hi,

One question as title. Is this possible to do it?

In this case, underscore ( _ ) is treated as a delimiter and then switch strings.

Thanks for your time in advance

- developer
developer
 
Posts: 1
Joined: Fri Dec 24, 2010 6:01 am

Re: How to rename file from ABC_1234 to 1234_ABC?

Postby DefAnt » Thu Dec 30, 2010 4:53 pm

Posted in wrong section - Please use the subforum "Regular Expressions" next time.

As for your question.

Using RegEx(1)
Match:
(.*)(_)(\d*)
Replace:
\3\2\1

This will change ABC to 3rd position and 1234 to 1st position.

You will have to fine tune it to match your actual files but I tested on a txt file using "ABC_1234" and it works exactly that way.
DefAnt
 
Posts: 16
Joined: Tue Sep 14, 2010 7:28 pm
Location: New Jersey, USA


Return to BRU Support