[resolved] how to rename input file

Highlighted
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);

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.