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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to wait for file on a ftp server?

Hi,
Everyday, I get some files on a ftp directory.
I never know the name or the number of those files (just the location and the files extension (*.csv or *.xml).
But sometimes, thoses files are late.... very late and all of the process runs with only one or two files instead of 10 or 15....
I will ask to receive with those files a file with the same name (for example : end_of_transfert.csv).
So I need to wait for its incoming before all of the process begins...
I can put a TWaitForFile
I can do that on a directory with a TWaitForFile.
But how can I do that with FTP???
Thanks for your help,
Labels (3)
4 Replies
Anonymous
Not applicable
Author

Hello,
You can do like this (see the image)
with this parameters :
tInfiniteLoop_1 : set "wait at each iteration" at 60 for example if you want to check the files every minute.
tFTPGet_1 : set Filemask at "end_of_transfert.csv"
set If link : ((Integer)globalMap.get("tFTPGet_1_NB_FILE")).equals(1)
tFTPGet_2 : set the files extension you need (*.csv or *.xml).
tDie_1 (to stop the infinite loop) :
Die message : "download all files OK"
Error code : 0
Priority : Info
JC
0683p000009MCZY.jpg
Anonymous
Not applicable
Author

very astucious ;-)

Jérémie
Anonymous
Not applicable
Author

Thanks a lot!!!
Fish3
Contributor
Contributor

Really great example! This really explained how to use the globalMap and looping.
If you use tFTPFileExist then an if you can do a simple check of an SFTP server for a file to be delivered.0683p000009M7Na.pngInfinite Looping Examples FTP