FTP client subcommand
How MGET transfers files:
To
copy one or more remote files, use the MGET FTP client subcommand in this
format. A separate GET subcommand is executed for each remote file you want
transferred. The server creates the name of the corresponding local file automatically
as determined by the Default Naming rules.
The MGET FTP client subcommand
uses the following process to determine where to put files.
- The MGET subcommand always places files in the current library or directory.
- If the user has issued the LCD subcommand, the server uses this library
or directory.
- If the user has not issued the LCD subcommand, the server sets the current
directory as follows
- If the user's job has a current library set, this library is the current
directory for FTP.
- If the user's job does not have a current library set, the server uses
QGPL as the current directory.
MGet {remotefile
[remotefile...]}[(Replace]
- remotefile
- The file or files you want to retrieve from the remote system.
- ( Replace
- Overwrites an existing file on your local system. If the file already
exists on your local system and you do not use the Replace option, the existing
file is not overwritten. The name of the local file where the remotefile is
copied is created automatically.
You can use an asterisk (*) to copy all
members in a file to your current library or directory. For example, if the
remote system is an iSeries™,
- MGET MYLIB/MYFILE. * copies all the
members of file MYFILE in library MYLIB on the remote system to your current
library on the local system.
- MGET /QSYS.LIB/MYLIB.LIB/MYFILE.FILE/ * .MBR would
be the NAMEFMT 1 version of this command.
- MGET /QOPT/PICTURES/IMAGES/. * copies
all the files of directory IMAGES from optical volume PICTURES to your current
library (or directory) on the local system.
- MGET TESTFILE.A * copies all members
that start with the letter A in file TESTFILE.
- MGET /QDLS/QISSOS2/A * copies all documents
that start with the letter A in folder QISSOS2.