Swap only part of the file name

Advanced Renamer forum
#1 : 10/08-16 22:57
Lori-Fay Street
Lori-Fay Street
Posts: 2
I have thousands of files to rename that are in this format: 00403_400050-002
I would like it to read like this: 400050_00403-002

So I want to swap PartA with PartB without moving PartC. PartB is always 6 digits, but Parts A and C vary in each file, so I cannot use the move method.
I thought I might be able to use the swap method, but I am not able to only swap two parts and leave the other alone.

Is there a way to make this happen in Advanced Renamer?

Thanks :)

10/08-16 22:57
#2 : 11/08-16 00:57
G. Lambany
G. Lambany
Posts: 187
Reply to #1:
Yes, use the following:

Method: Replace
Text to be replaced: ^(.+?)_(.+?)-(.+?)
Replace with: \2_\1-\3
Occurence: 1st
Case sensitive: Unchecked
Use regular expression: Checked
Apply to: Name

this regex will allow each number to expand or contract, but will not allow the delimiters to change. First has to be "_" and second "-"

it could be better, but that would require more information on the extreme cases of the filenames..


11/08-16 00:57
#3 : 11/08-16 14:33
Lori-Fay Street
Lori-Fay Street
Posts: 2
Reply to #2:
Thanks, so much. It worked like a charm, You're a life saver!

11/08-16 14:33