Re-arranging Irregular Filenames

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

Re-arranging Irregular Filenames

Postby BobT » Mon May 07, 2018 4:57 am

Hi,

I'm new to Bulk Rename, and I find it very powerful. However, my capacity to use it is less so. I have managed to achieve most of what I need, but am lost on the last bit. I have file names such as 409_A123-FEBSETSUBJECT-My Best Image.jpg and 607_B456-FEBPRINT-My Other Best Image.jpg
So far I have managed to reduce those to A123 My Best Image.jpg and B456 My Other Best Image.jpg
However, I'd also like to change the order so that they read My Best Image A123.jpg and My Other Best Image B456.jpg

(If possible, I'd also like to be able to export all of the new image names as a list, but if that's not possible I can always do that from Explorer.)

Any clues please ?
BobT
 
Posts: 2
Joined: Sat May 05, 2018 2:41 am

Re: Re-arranging Irregular Filenames

Postby therube » Mon May 07, 2018 4:22 pm

Assuming there are no dashes in the "name part", then you could simply use:

1:RegEx
Code: Select all
Match:   (.*)-(.*)
Replace:   \2 \1
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Re-arranging Irregular Filenames

Postby BobT » Thu May 17, 2018 12:24 am

therube wrote:Assuming there are no dashes in the "name part", then you could simply use:

1:RegEx
Code: Select all
Match:   (.*)-(.*)
Replace:   \2 \1


Thanks so much for the reply - I didn't see it until now. I don't think I had the "notify me" box ticked!

I tried it, but it didn't work at all for some reason. I'll keep trying other combinations and see how that goes. Again, sorry for not replying earlier! :oops:
BobT
 
Posts: 2
Joined: Sat May 05, 2018 2:41 am

Re: Re-arranging Irregular Filenames

Postby KenP » Thu May 17, 2018 4:03 pm

This works with the two examples you've given ("A123 My Best Image.jpg" and "B456 My Other Best Image.jpg").

RegEx (1)
Match: (\D\d*) (.*)
Replace: \2 \1
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am

Re: Re-arranging Irregular Filenames

Postby therube » Thu May 17, 2018 4:27 pm

Oh, what was I thinking at the time?
(Well, I know what I was thinking, I thought you just wanted to reverse the order to get the "name part" in front.)

Anyhow, & assuming your naming pattern is consistent, try:

1:RegEx
Code: Select all
(.*)_(....)-(.*)-(.*)
\4 \2
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm


Return to BRU Support