× 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 Thu, Sep 21, 2023 at 5:21 AM Don Brown via MIDRANGE-L
<midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

The web pages I have looked at for ftp completion codes shows

226
Closing data connection. Requested file action successful (for example,
file transfer or file abort).

I think it's useful to provide actual links to what you looked at, so
others may benefit. Of the many reputable places to find that
information, I like the presentation here:

https://en.wikipedia.org/wiki/List_of_FTP_server_return_codes

For Wikipedia haters/doubters, you can also look for "more official"
reproductions of RFC 959, such as

https://www.w3.org/Protocols/rfc959/
https://www.freesoft.org/CIE/RFC/959/index.htm

The relevant section is 4.2.

So my question ...

Is checking the first 3 characters for 226 sufficient to indicate the file
transfer was successful and processing of the retrieved data should
continue.

If you are sure you are reading an FTP response message, then yes.

I could imagine unlikely scenarios where there happens to be a 226 in
the first 3 characters but it's not an FTP response code. So you could
try reading the first 4, and making sure the 4th one isn't a digit.
The "best" solution would depend on how careful or specific you want
to be, and the FTP server(s) connected to.

John Y.

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.