The mget command is used to transfer files from the remote host to the local host. Files can also be transferred from the remote to the local host by using the get, reget and recv commands.
mget |
<remote-file> [<remote-file>] [<remote-file>] ... |
<remote-file>
Name of the file on the remote host to be transferred to the local host. Multiple file names may be specified.
The files are assigned the same names on the local host as they have on the remote host. The file names must therefore comply with the rules for the local host as well as with those of the remote host.
If the prompting function is enabled (see prompt), FTP requests confirmation before transferring each file.
Example
The remote host is a Unix host.
Query names of local and remote working directories.
lpwd Local directory is :5:$TCPTEST.MAN.SAM.VON.SINIX. pwd 257 "/usr/tcptest/man/sam/nach.bs2000" is current directory.
All files from the remote working directory are transferred. The FTP server function PORT is called implicitly. The prompting function is disabled in this example (see prompt).
mget * 200 PORT command okay. 150 ASCII data connection for anton (89.16.100.0,1192). 226 Transfer complete. 242 bytes received in 0.06 seconds (3.69 Kbytes/s) 200 PORT command okay. 150 ASCII data connection for anton.1 (89.16.100.0,1193). 226 Transfer complete. 242 bytes received in 0.06 seconds (3.75 Kbytes/s). . further transfers . 200 PORT command okay. 150 ASCII data connection for caesar (89.16.100.0,1199). 226 Transfer complete. 10845 bytes received in 0.78 seconds (13.56 Kbytes/s)