GET (Copy a File from a Remote System to the Local System)

The GET IBM® i FTP client subcommand copies a file from the remote system to the local system.

FTP client subcommand

Get remotefile [localfile]
[(Replace]

remotefile
The file that you want to retrieve from the remote system.
localfile
The local file member, document, or other file you want to create. If you do not specify a local file name, the FTP client provides a default name. For information about the default names, see Default file names for client transfer subcommands.
( Replace
Writes over the localfile if it already exists. The server does not overwrite the localfile unless you specify (Replace.

The file system in which the file resides determines which file name format you use with the GET subcommand.

  • If the file does not reside in the library file system (QSYS.LIB), you must use the GET subcommand in name format (NAMEFMT) 1:
    GET /QDLS/QIWSOS2/PCSMENU.EXE
  • If the file resides in the library file system, use the GET subcommand and the name format (NAMEFMT) set to 0:
    GET YOURLIB/YOURFILE.YOURMBR (REPLACE

    Assuming that the remote system is a System i® product, this command gets the YOURMBR member of YOURFILE file in YOURLIB library and places it in YOURMBR member of YOURFILE file in your current directory on your local system.

Note: If the remote file name requires apostrophes as part of the file name, then enclose the file name within two more sets of apostrophes. The following example gets 'MEMBER.ONE' from the remote host.
GET LIBRARY/FILE.MEMBER 'MEMBER.ONE'