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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Copy most recent file from one directory to another

Hi everyone.
I am trying to build a job in open studio that copies a .txt file from one location to another location. There will be a number of .txt files in the directory, but I only want to copy across the most recent one.
for example 
file1.txt
file2.txt
file3.txt
I am trying to do this based on the date modified properties.
I have looked through a few posts on here but have not managed to get any solution to work.
Would anyone be able to point me in the right direction, or even better if you have any print screen examples I could follow?
Many thanks in advance!
Labels (2)
14 Replies
Anonymous
Not applicable
Author

Thanks again for your response.
I can see the abs_path in the schema of the tlogrow, but how do I use that in the tfilecopy to indicate the file to use?
TRF
Champion II
Champion II

Well, for tFileCopy try row7.abs_path.
Should work.
Anonymous
Not applicable
Author

You my friend are an absolute star!
Do you happen to have any guidance to explain the row7 part? It is working like a charm.
Many thanks!
TRF
Champion II
Champion II

Thank's Richard, it's a pleasure for me to help people as often as I can.
If you click the red arrow after tLogRow (row7), details are displayed on the component tab.
Just refere to flowname.fieldname to use them as soon as they have a value.
Carefull, if you refere to flowname.fieldname in a subjob after the one where this flow is defined, you'll get the las value for this field.
Regards,
TRF
Anonymous
Not applicable
Author

Great, very helpful!