qftp is a utility that performs file transfers using ftplib based on instructions presented on the command line.
qftp <action> <host> [ -l user [ -p pass ] ] { options/files }... Actions: send, get, dir, list, rm Options: -v level Set verbosity -r rootpath Change remote working directory -m umask Set umask for created files -a | -i Set ascii/image transfer mode -w Toggle wildcard mode -s cmd Send cmd as a SITE command -b Toggle stripping of path from filename on send
If user is not specified, qftp will use anonymous. If pass is also not specified, qftp attempts to build a password from the translation of the environment variable "USER" and the string returned by gethostname() separated by an "@".
qftp reads the command line argument by argument and acts on each as it comes to it. Most options only change the value of a variable. The '-m' (umask), '-s' (site), and '-r' (change directory) options are executed immediately by sending the command to the server. The '-a' (ascii) and '-i' (image) options save the type for subsequent transfers. When a filename is encountered it is sent to the server with the command for the selected action.
It is possible to send multiple files with different modes on the same command line. For example, the following command will send all text files in ascii mode and all zip files in image mode:
qftp send srvr -a *.txt -i *.zip
qftp may optionally be invoked through a softlink. qftp searches the command which invoked it for 'send', 'get' or 'dir' and, if found, performs the requested function. In this case, leave off the action argument on the command line.
For example; create the following softlinks:
ln -s qftp ftpsend ln -s qftp ftpget ln -s qftp ftpdir ln -s qftp ftplist ln -s qftp ftprm
and then invoke transfers with 'ftpsend' instead of 'qftp send', etc.
If no file names are specified on the command line, qftp will read file names from stdin. Use your favorite utility to generate a list of files to send/retreive or type them interactively.