Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Renaming a File and moving it to another folder.

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:

0683p000009M9vx.png

 

 

However, I get the following error message:

 

 

0683p000009MA4b.png

 

So, can you help me please:

a) is the program correct?

b) What does the error mean?

 

Kind regards, 

Newbee

 

 

Labels (2)
1 Reply
billimmer
Creator III
Creator III

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