Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
NMonchicourt
Contributor
Contributor

How to avoid : tFTPFilelist can't find file

Hi,

I have 42 FTP folders that I check one by one. Each of them can contain or not one or multiples .csv with non-constant name.

I can't simply use tFTPGet ("*.csv") ----on component ok ----> TFTPDelete ("*.csv") because a file can be upload between the tFTPGet and tFTPDelete, so it will be delete and not download (already happened)

So I tried tFTPFilelist ----iterate ----> tFTPGet ("CURRENT_FILE variable") ----- on component ok ----> tFTPDelete

("CURRENT_FILE variable")

The problem is : If the folder do not contain any file, tFTPFilelist generate an error and job die.

  • tFTPFilelist don't have a die on error option

  • tFTPFileExist can only look for a specific file with specific name (can't use "*.csv")

I would like to treat ftp files one by one, might be the best option to not delete a file that haven't been download.

Thanks

Nicolas

Labels (3)
2 Replies
Anonymous
Not applicable

Hi

How do you specify the remote directory on tFTPFilelist? Read the 42 folder path from somewhere and iterate them one by one, and use the current folder path on tFTPFilelist?

 

Regards

Shong

NMonchicourt
Contributor
Contributor
Author

Hi Shong,

 

Thanks for your answer.

 

Due to possible futures changes, I'm using a table :

0695b00000Lz5NkAAJ.png 

Every row of the table are sending a specifical FTP folder to the childjob T_FTP_GET_FILE_GENERIQUE

 

And then the child job is support to check this folder, and to treat each file one by one (get, delete, then go on the next file)

 

0695b00000Lz5OJAAZ.png 

But an empty folder will generate an error with the tFTPFilelist, on the contrary of a tFileList with local folder

 

Regards,

Nicolas