[SJF Logo]
Steve Friedl's Weblog

May 09, 2003
New tool: ftpput

I've used "wget" for a long time to fetch files from a remote web server, but I've not known of a program that would go the other direction. In the past customers have solved this with a response file:

ftp ftp.example.com < inputs

where "inputs" contained the commands to exeucte. This is a terrible mechanism because there is no error feedback - it's a bad way to script it.

My solution was to use expect to interact with the FTP client, but this requires a lot of work to test and find the exceptional cases, though it's much better than the response file method.

Recently I decided to do it properly: I used the Net::FTP perl module and creates a simple ftpput wrapper. This has been in use at several customers for some time with great success. It's not anywhere nearly as robust as wget, but it's served us very well.

Unixwiz.net Tool: ftpput

Posted by Steve at May 09, 2003 03:27 PM | TrackBack
Comments

NcFTP comes with a set of useful tools for shell scripting.

See http://www.ncftpd.com/ncftp/

Posted by: Olivier on May 10, 2003 01:53 AM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?