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: 
CSen
Contributor II
Contributor II

tFileCopy keeping timestamp metadata of source file

Hello,

Using Talend 7.2.1, each time I use the tFileCopy it does keep the "lastModified" metadata from the source file to the ouput file, but I would like to make a simple copy of files with the current and new modified date for the new copied file.

Is there a way to do that using the tFileCopy component that I missed ? or should I go with Java code ?

Thanks in advance,

Labels (4)
1 Solution

Accepted Solutions
CSen
Contributor II
Contributor II
Author

Hi,

 

Thanks for the quick reply,

 

Well actually my job is just a tFileCopy component in the job. But I found why this metadata was set with the value of the source file, the copyFile method of FileCopy class from org.talend package :

0693p000009HvgBAAS.png

 

I'm a bit disturbed that we don't have any option to allow or not this setting. So to resolve my issue I just placed back the current timestamp in the "lastModified" property of output file.

0693p000009HvfNAAS.png

If there is another "proper" way to do it, I would be glad to know,

View solution in original post

2 Replies
manodwhb
Champion II
Champion II

@charles senechal​ ,if possible can you share your job design and explain the problem.

CSen
Contributor II
Contributor II
Author

Hi,

 

Thanks for the quick reply,

 

Well actually my job is just a tFileCopy component in the job. But I found why this metadata was set with the value of the source file, the copyFile method of FileCopy class from org.talend package :

0693p000009HvgBAAS.png

 

I'm a bit disturbed that we don't have any option to allow or not this setting. So to resolve my issue I just placed back the current timestamp in the "lastModified" property of output file.

0693p000009HvfNAAS.png

If there is another "proper" way to do it, I would be glad to know,