Hi everyone, I find the answer you just added (C0Py0) for each new file loaded after this test, if your file is exsite than calling the change () method;
<%!
String reverseIt ( ) { int i, len = source.length(); StringBuffer dest = new StringBuffer (len);
for (i = (len - 1); i >= 0; i--)
dest.append(source.charAt(i));
return dest.toString();
}
% > <%!
(String ffName) {
String newName, ext, finalName;
String invName, increment;
String copyf = null;
; int = 0; int j = 0; int incr; int k = j + 4;
NEWNAME = ffName.substring(0, ffName.length() - 4);
ext = ffName.substring(ffName.length() - 3, ffName.length());
invName=reverseIt(newName);
while(k != invName.length()){
if( invName.substring(j,k).equals("yP0C")){
copyf=invName.substring(0,j);
k=invName.length()-1;
}
else{
j++;
k++;
}
}
increment=reverseIt(copyf);
//System.out.println(increment);
incr=Integer.parseInt(increment);
incr+=1;
newName=newName.substring(0,newName.length()-(j-1));
increment=String.valueOf(incr);
finalName=newName+increment+"."+ext;
return finalName;
}
% >
, outpers