× 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.



ftp_dir returns the whole directory line and stores the results in an
array.
ftp_dirraw returns the whole directory line and calls a procedure that
you specify.
ftp_list returns just the filename and stores the results in an array.
ftp_lstraw returns just the filename and calls a procedure that you
specify.

Look at the sample program TEST2SESS. It opens two connections, on that
does a directory listing, and one that downloads the files. You could
basically use that as is just adding the logic to decide what files you
want, or you could get your listing in a file or array, and then go back
and download and delete.




Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf
Of Bob Cagle
Sent: Monday, November 13, 2017 3:17 PM
To: Midrange Systems Technical Discussion
Subject: FW: Retrieve directory contents of an FTP server

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.
What are
the differences between each of these?

Anyone else doing the same thing and willing to share the script?

Thanks

Bob Cagle
IT Manager
Lynk

-----Original Message-----
Bob Cagle

I just started looking at Scott's FTPAPI. I agree, it looks quite a
bit more
functional.

Thanks
Bob

From: Charles Wilt

Don't use this code...

The best solution is Scott's FTPAPI...

You have direct control over the FTP interaction.

Charles
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.