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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
shake
Contributor II
Contributor II

Get files from FTP, then delete them

I would like download all the files from an FTP directory and then delete them when they have been successfully downloaded.  If new files have been placed in the FTP directory during the process, I need to make sure not to delete them--only the ones that have been downloaded.

 

I know I can use tFTPFileList to get the list of files, tFTPGet to download them, and tFTPDelete to delete them.  I can easily download all the files at once from the directory and delete all the files at once.  How can I make sure that I only delete the files that I downloaded and that no new files have been added to the FTP directory?

 

Do I need to download and delete the files one at a time by name?

Labels (2)
1 Solution

Accepted Solutions
shake
Contributor II
Contributor II
Author

Here's what I've come up with so far:

 

0683p000009Ma0P.png

The file mask in both the tFTPGet and tFTPDelete is:

((String)globalMap.get("tFTPFileList_1_CURRENT_FILE"))

 

It seems to be working.

 

View solution in original post

1 Reply
shake
Contributor II
Contributor II
Author

Here's what I've come up with so far:

 

0683p000009Ma0P.png

The file mask in both the tFTPGet and tFTPDelete is:

((String)globalMap.get("tFTPFileList_1_CURRENT_FILE"))

 

It seems to be working.