Having done this one too many times and gotten sick of it, we decided to write a perl program that talks to the remote server directly using the Net::FTP module. This made the whole thing easy and reliable. The program is not very large at all - just a front end for the real workhorse provided by Net::FTP.
$ ftpput --server=ftp.unixwiz.net --verbose --user=steve --pass=yahright file1 file2 --> put file1 (sent OK) --> put file2 (sent OK)
--help | Show a brief help listing to the standard error and exit. |
--debug | Enable Net::FTP package debugging. This is quite verbose and the output format is not always very helpful. For everyday use, try --verbose instead. | --verbose | Print the name of each file being transferred. This is much less "noisy" than --debug. |
--server=SVR | Connect to the FTP server SVR. This can be a hostname or an IP address. This parameter is required. |
--user=U | Login as the user U, or use anonymous if not given. |
--pass=PASS | Provide password PASS to the FTP server during login. This defaults to "-anonymous@" if not given, but this is not very meaningful if this is not an anonymous connection. Sorry that this password is provided in cleartext on the command line: this has been entirely suitable for all of our applications. |
--dir=DIR | Change to directory DIR on the remote system before sending any files. All the files provided on the command line have only the final part of the pathname considered - the directory path of the source files are not considered in any way. |
--passive | Use passive FTP mode instead of active. This may be required by an Internet firewall in between your station and the remote FTP server. |
--ascii | Send the file in ASCII mode, which attempts to convert the local line termination (CR/LF, newline, CR) to that used by the remote server. This is only useful for text files. |
--binary | Use binary ("image") mode when sending the file to the remote system. This performs no conversions of any kind on the data. |
--hash | Print a hash mark (#) every 1024 bytes during the transfer to show progress. |
Navigate: More Tools