× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 11/13/2017 4:17 PM, Bob Cagle wrote:
So I've been looking at Scott's FTP API. I tried to post this message to his FTP-API mailing list, but my message was rejected for some reason. Maybe someone here can shed some light:

So, I need to connect to a partner's FTP site and download and remove any files they've added in a specific directory since the last session.

I can't use MGET with MDEL as I might delete something that hasn't been processed yet. I need to get the list of files, then get and delete each file individually.

Which FTPAPI procedure would be best for getting the list of files? I see FTP_dir, FTP_dirraw, FTP_list, and FTP_lstraw as possible options.
Check the examples in LIPFTP/QRPGLESRC, especially TESTMIRIN and
EX6TREEFRM. These use ftp_list to return a list of file names into an
array.

ftp_dir returns a list of files, dates, etc into an array. It uses
ftp_dirraw which uses LIST and a callback to format each line.
ftp_list returns a list of file names into an array. It uses
ftp_listraw which uses NLST and a callback to format each line.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.