Rename files reusing given numbering

Advanced Renamer forum
#1 : 25/02-14 11:49
Samuel
Samuel
Posts: 1
So I have some Files which generally look like this:

..
RU10_ThDII_FS12_Lsg.pdf
RU10_ThDII_FS13_Aufg.pdf
..

I want to rename them to look like this:

FS12_RU10_Lsg.pdf
FS13_RU10_Aufg.pdf

So generally it should have the form:

FS[x]_RU[y]_[z]

whereas [x] is the number behind FS, [y] is the number behind RU and [z] is either "Aufg" or "Lsg" according to the previous name.

I tried some things but nothing seemed to work, so I hope to find some help here :) Thanks in advance!


25/02-14 11:49
#2 : 11/03-14 19:24
Stefan
Stefan
Posts: 274
Reply to #1:

Hi,


FROM:
RU10_ThDII_FS12_Lsg.pdf
RU10_ThDII_FS13_Aufg.pdf

TO:
FS12_RU10_Lsg.pdf
FS13_RU10_Aufg.pdf

Rule:
Match till underscore (1), "RU10_"
match till underscore (2), "ThDII_"
match till underscore (3), "FS12_"
match the rest (4), "Lsg"

Replace with
capture of \3, "FS12_"
capture of \1, "RU10_"
capture of \4 , "Lsg"
Drop capture of \2, "ThDII_"


Use Replace Method (http://www.advancedrenamer.com/user_guide/metho d_replace)

Find: (.+_)(.+_)(.+_)(.+)
Replace: \3\1\4
[X]RegEx
Apply to [Name]


OR, since we drop capture \2 anyway, we do not have to capture this part at all:
Find: (.+_).+_(.+_)(.+)
Replace: \2\1\3
[X]RegEx
Apply to [Name]


.


11/03-14 19:24