[resolved] how to rename input file

One Star

[resolved] how to rename input file

I have some input files in my local machine, after processing those files I need to rename the files. something like FILENAME.DONE or FILENAME.ERR
how this can be possible? any suggestions?

Accepted Solutions
One Star

Re: [resolved] how to rename input file

done by putting this code in tJava component
File file = new File(context.Directory+"\\"+ context.fileName);
File file2 = new File(context.Directory+"\\"+ context.fileName+".done");
file.renameTo(file2);

All Replies
One Star

Re: [resolved] how to rename input file

done by putting this code in tJava component
File file = new File(context.Directory+"\\"+ context.fileName);
File file2 = new File(context.Directory+"\\"+ context.fileName+".done");
file.renameTo(file2);