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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Downloading most recent file from an ftp server

Hi, 
I'm trying to download the most recent file from an ftp server, by iterating through a directory using a tFtpFileList and tFtpFileProperties components. Then I'm sorting the rows using the "mtime" field, and sample the first row of the table, so that I can get the properties of the most recent file. My problem is that I cannot get the value from the tSampleRow component in order to pass it as a filemask parameter in the tFtpGet component (I use "row3.basename" as a filemask, which doesn't give any results). What am I missing here ?
  
0683p000009MFgc.png
0683p000009MFeN.png

Thanks !

Labels (2)
2 Replies
JR1
Creator III
Creator III

You are missing a tFlowToIterate component between tSampleRow_1 and tFTPGet_1. In tFTPGet_1 the filemask should then be something like ((String)globalMap.get("row3.basename")).
Anonymous
Not applicable
Author

Hi, 
Many thanks for the hint ! apart from missing the tFlowToIterate component, I also had to add some extra components : a tBufferOutput to store the file properties, and an tBufferInput to read the results, before sorting them and sampling the first line.
0683p000009MFgh.png