Monday, November 16, 2009

Windows command line FTP client that support PASV (passive mode)

If you're trying to write an FTP transfer into a script and require a command line client that support passive mode transfers, you'll need a third-party solution. This is because ftp.exe that is built into Windows does not support passive mode. Luckily, there is a free third-party solution that works pretty well and I'm now using it for some of my scripts. It is NcFTP, and is a Windows adaptation of a Linux application. It has versions for multiple OS's, one of which is Windows. You can download it free from http://ncftp.com/download/, then scroll down to the Download NcFTP Client section and find the Windows download link. If you're wondering, NcFTP also provides an FTP server application at the same download location.

There is an installer involved, which will install ncftp.exe, ncftpput.exe, and ncftpget.exe. Using some switches, you can then use ncftpput.exe and ncftpget.exe to script transfers to and from FTP servers, including those that only support passive mode.

For command line switches and additional documentation, it can be found at http://www.ncftp.com/ncftp/doc/faq.html.

No comments: