next up previous
Next: Uploading Files Up: Simple FTP Client Sessions Previous: FTP wildcards

Retrieving Files

There are a few get and retr commands which achieve essentially the same thing. One useful feature is mget which can be used to get multiple files. This is especially useful with wild card selection.

The commands that can be used to retrieve files are:

get
remote-file [ local-file ] -- Retrieve the remote-file and store it on the local machine. If the local file name is not specified, it is given the same name it has on the remote machine, subject to alteration by the current case , ntrans, and nmap settings (See below). The current settings for "representation type", "file structure", and "transfer mode" are used while transferring the file.

recv
remote-file [ local-file ] -- The same as for get .

mget
remote-files -- Multiple Get: Expand the remote-files on the remote machine and do a get for each file name thus produced. See glob for details on the filename expansion. Resulting file names will then be processed according to case , ntrans, and nmap settings. Files are transferred into the local working directory.

The mget command is typically used with wild cards (see FTP wild cards above). The setting of the prompt is also useful for ues with mget (and mput which we see below)

prompt
-- Toggle interactive prompting. Interactive prompting occurs during multiple file transfers to allow the user to selectively retrieve or store files. By default, prompting is turned on. If prompting is turned off, any mget or mput will transfer all files, and any mdelete (see below also) will delete all files.

next up previous
Next: Uploading Files Up: Simple FTP Client Sessions Previous: FTP wildcards
Dave Marshall
9/28/2001