Renaming files from TDI by using this script in hooks
var Name1 =system.getExternalProperty("File1");
var Name2 = system.getExternalProperty("File2");
try {
var ReadFile = new java.io.File(Name1);
//read last created file
if(ReadFile.length()>0) {
//task.logmsg ("%%%%%%%Epilog: newfile: "+ReadFile);
system.renameFile(Name1, Name2);
}
}
catch (e) {
task.logmsg(e.toString());
}
var Name1 =system.getExternalProperty("File1");
var Name2 = system.getExternalProperty("File2");
try {
var ReadFile = new java.io.File(Name1);
//read last created file
if(ReadFile.length()>0) {
//task.logmsg ("%%%%%%%Epilog: newfile: "+ReadFile);
system.renameFile(Name1, Name2);
}
}
catch (e) {
task.logmsg(e.toString());
}
No comments:
Post a Comment