Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
vpachu
Contributor
Contributor

Get multiple files with same name with ftp

I'm trying to pull files from ftp location and process it. If two files have same name but loaded with different timestamps currently the earlier file is copied to local. How can I copy only the latest and ignore the old.

Labels (2)
4 Replies
manodwhb
Creator III
Creator III

You need to use add the date part to your file name in filemask of tFTPlist.
vpachu
Contributor
Contributor
Author

The filenames are identical, just the receive timestamps of the files on the ftp server are different. In the below example I want use the second file with timestamp 20191029143000.

Example:

FILENAME | TIMESTAMP

FILE1_20191029163000.ZIP | 20191029140000

FILE1_20191029163000.ZIP | 20191029143000

ankit7359
Creator II
Creator II

Hi @vpachu ,

 

For this scenario, you can add in the checkbox of order by & order action in tfilelist - date modified & Desc -> this setting will enable you to pull in the files which are recently modified. Also you can add in another setting in tFTPGET component -> Below Transfer Mode -> there is overwrite file -> considering the same file name is being sent thru FTP, then you can check the option of overwrite the file.

 

Pls let me know, in case if something is not clear.

Thanks,

Ankit

vpachu
Contributor
Contributor
Author

Thanks @ankit7359 . I using this subjob in other jobs to get files. I have overwrite enabled already, but still It's not able to get the latest file, it always ends up with the first file instead of the latest one.

0683p000009M80p.png