Syntax: mget <server filespec> [to] [<pc filespec>] [append | askuser | cancel | overwrite | skip | unique]
FTP Command Index SFTP Command Index
The MGET command transfers one or more files matching the given filespec from the FTP server to the PC. You can use wildcards to transfer multiple files. Most servers support wildcards in the <serverspec>. However, if your server doesn't support wildcards in an LS command, using MGET with a wildcard specification may result in a transfer of all files in the current directory.
NOTE:The Reflection client supports MGET in SFTP sessions, however you should test transfers that use wildcard characters because the SFTP server may not interpret wildcard specifications correctly.
Before using the MGET command, if necessary, use the ASCII, BINARY, TENEX, orSMART command to override the default file transfer method setting specified on the Tools menu.
A variety of site-specific SET parameters can affect the transfer operation. Click here for more information.
<server filespec> |
Specifies one server file or (using server wildcards) multiple server files to transfer to the PC. If a <server filespec>is given with no other options, the PC files are given the same names as the server files. |
to <pc filespec> |
Specifies a PC folder to receive the files, or the name of the PC file to create. The TO keyword is optional. If this option is omitted, server files are transferred to the current folder. If <server filespec> specifies more than one file, the <pc filespec> should typically be a directory path. To consolidate a series of server files in one PC file, you can specify a file name for the <pc filespec> and use the APPEND option. Use quotation marks if the file or path includes spaces. For example: MGET *.* "C:\My documents\*.*" |
append | askuser | cancel | overwrite | skip | unique |
Specifies what to do if the destination file already exists. If this option is omitted, the active TRANSFER-DISPOSITION setting is the default. |
Examples
This example transfers all files with a .Doc extension from the FTP server to the PC, placing the files in the current PC directory:
MGET *.Doc
This example adds the letter A to the transferred files. For example, test.txt becomes Atest.txt.
MGET *.* A*.*
See ABORT-ON-ERROR Script Sample for an additional example.