Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello dear community,
I have the following task which I unfortunately cannot get to work:
I need to move files from one folder to another folder. The file should be renamed using the current date.
Therefore, I have built the following program:
However, I get the following error message:
So, can you help me please:
a) is the program correct?
b) What does the error mean?
Kind regards,
Newbee
you only need the tFileList for this, connected to the tFileCopy. In the tFileCopy, specify the destination name as something like this:
TalendDate.formatDate("yyyyMMddHHmmss",TalendDate.getCurrentDate()) + "_" + ((String)globalMap.get("tFileList_1_CURRENT_FILE"))
In this example, if a file was called myfile.txt, then it would become
20200421110716_myfile.txt