Only part of files need to be rename.

Advanced Renamer forum
#1 : 28/01-15 13:46
Pieter
Pieter
Posts: 3
I need help with the following problem


Before
123456-01-01.jpg
123456-01-02.jpg
123456-01-03.jpg
123456-01-04.jpg
123456-01-05.jpg
234567-02-01.jpg
234567-02-02.jpg
234567-02-03.jpg
123567-02-04.jpg
234567-02-05.jpg

after
123456-01-03.jpg
123456-01-01.jpg
123456-01-02.jpg
123456-01-04.jpg
123456-01-05.jpg
234567-02-03.jpg
234567-02-01.jpg
234567-02-02.jpg
123567-02-04.jpg
234567-02-05.jpg

The first 3 files of every sequence need to be changed, picture 1 need to become 3, 2 becomes 1 and 2 becomes 3, 4 and 5 don't need to be changed.

Can someone help me with this?


28/01-15 13:46
#2 : 28/01-15 20:16
Kim Jensen
Kim Jensen
Administrator
Posts: 878
Reply to #1:
This is difficult. You basically want to rotate the 1, 2, and 3 numbers. The difficult thing is that you cannot rename 1 to 3 as long as 3 already exists. I will suggest to start by renaming them to larger numbers first, like 6, 7, and 8 if they do not exists yet, and then rename them back to 1, 2, and 3.

You can change the last number of a file by adding the Replace Method and configure it like this:
Text to be replaced: -01$
Replace with: -06
Use regular expressions: checked

Note: you can use more than one Replace Method at the same time. This way you can rename more numbers in one batch.


28/01-15 20:16
#3 : 29/01-15 11:36
Pieter
Pieter
Posts: 3
Thanks for your replay.
It 's not possible to use the move batch instead of rename batch?
So first you move the file with *-01 to a new folder and than rename it to *-03. I know I can do it with the program Bulk rename utility, but I can't do it in bach, and I was wondering if it was possible with advanced renamer with a minimal of clicks or a script.


29/01-15 11:36
#4 : 29/01-15 20:53
Stefan
Stefan
Posts: 274
Reply to #4:

 
Me think you wanted to write:
1 need to become 3,
2 becomes 1 and
3 becomes 2, ???



Maybe try this:


Step 1

"replace"; replace:"01$"; replacewith:"03#"; regularexpressions:"1";

"replace"; replace:"02$"; replacewith:"01"; regularexpressions:"1";

"replace"; replace:"03$"; replacewith:"02"; regularexpressions:"1";

Start Rename.


Step 2

Load the files again (there is also a setting to do this automatically)

Remove or Disable the three Replace methods.

"removepattern"; pattern:"#";

Start Rename.

Done!


The trick is to change 01 to 03#, and remove the # again in a second step.


HTH?


29/01-15 20:53
#5 : 02/02-15 10:16
Pieter
Pieter
Posts: 3
Reply to #4:

Thanks for your suggestion.
The first method of replacing 1, 2, 3 to 6, 7, 8 and than back to 3, 1, 2 did the job fine, Thanks.


02/02-15 10:16