views:

2106

answers:

4

I'm looking for a good open source Windows FTP client library with a public domain or BSD-type license. Something that I have access to the source code and I can use it from C++ for Windows applications in a commercial app.

We have used Wininet for years and it's buggy and horrible. The last straw is the IE8 beta 2 contains a new bug in InternetGetLastResponseInfo(). I can no longer justify using Wininet when our users can install the latest version of IE and break our app.

I have looked at libcurl but it is way too heavy for our needs. The only thing I need is FTP support. I could spend a day stripping out all the code in libcurl I don't need, but I'd rather just start with a nice simple FTP client library, if possible.

I looked at ftplib (http://nbpfaus.net/~pfau/ftplib/) but it's GPL and I need this for a closed-source commercial app.

I've written FTP client code before, it's not that hard (unfortunately it was 15 years ago and I don't have the source code anymore). There must be a nice simple free client library that does nothing but FTP and has a license that can be used in closed-source commercial apps.

(If you are curious, the bug is that if you attempt to FtpFindFirstFile() with an FTP site where you can't make a passive-mode connection, InternetGetLastResponseInfo() doesn't return the full response. This is just one of many bugs I've found over the years. Another is that Wininet's FTP support ignores all timeout values. That particular bug has existed for years.)

+1  A: 

Checkout filezilla server for windows.

Cory House
+1  A: 

Are you looking for a command-line interface or an API? You may be able to adapt the feature-rich wget to your needs. Otherwise, take a look at http://www.sourceforge.net for lots of options.

Adam Liss
+2  A: 

I have used libCurl to very good effect. The only disadvantage is that, to my knowledge, there is no support for parsing directory information that comes back from FTP servers (apparently, there is no standard directory format).

Jon Trauntvein
+3  A: 

You need Ultimate TCP/IP which is now free!

http://www.codeproject.com/KB/MFC/UltimateTCPIP.aspx

You get FTP. HTTP, SMTP, POP and more.

You won't regret it.

Rob
This looks perfect, it seems to be very well organized and understandable, will full source code, the right license, and I made a simple test console FTP app that compiled to only 42k. Thanks!
mhenry1384