Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Hi Shong,
Thanks for your answer.
Due to possible futures changes, I'm using a table :
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)
But an empty folder will generate an error with the tFTPFilelist, on the contrary of a tFileList with local folder
Regards,
Nicolas