Script method

Advanced Renamer forum
#1 : 14/01-15 13:59
Maria Aguirre
Maria Aguirre
Posts: 1
I saved a lot of images that I haver named 1001, 1002 so on till 1500. I know which image corresponds with each step so I am using your Advanced Reamer to rename them.

I tried with the script method as each image corresponds to a different step. For instance image 1001 corresponds to data from Argentina, image 1001 correspond to data from Brazil.

I tried with this:
var val = (1001)
return item.newBasename + 'AR';
var val = (1002)
return item.newBasename + 'BR';

and it did not work.


14/01-15 13:59
#2 : 25/03-15 22:12
NomenEtOmen
NomenEtOmen
Posts: 29
Reply to #1:

i don't know exactly your problem, but i think following:

your files:
1001.jpg -> AR.jpg
1002.png -> BR.png
1003.raw -> CH-1003.raw
..and so on...

to solve you can do follow script applied to Name:


var oName = item.name; // original name

if (oName=="1001") {
return "AR";
} else if (oName=="1002") {
return "BR";
} else if (oName=="1003") {
return "CH-"+oName;
}


25/03-15 22:12