PUT (Copy a File Member from the Local System to a File on a Remote System)

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

FTP client subcommand

PUT localfile [remotefile]

localfile
The name of a local library system file member, save file, document, or other file.
remotefile
The name of the delivered file on the remote system. If you do not specify the remote file name, the FTP server provides a default name. If a remote file with the same name already exists, then the FTP server replaces the contents of the remote file with the contents of the local file unless the Store Unique (SUNIQUE) value is on.

To send a file to the remote system, you must have a defined current working directory with write privileges.

The following example uses the PUT subcommand to transfer a file member:

 PUT MYLIB/MYFILE.MYMBR (NAMEFMT = 0)

The previous example sends member MYMBR of file MYFILE in library MYLIB to the remote system.

The following example sends the document PCSMENU.EXE of folder QIWSOS2 in the document library services file system to the remote system.

 PUT /QDLS/QIWSOS2/PCSMENU.EXE (NAMEFMT = 1)
Note: If the remote file name requires apostrophes as part of the file name, then you must enclose the file name within two more sets of apostrophes. The following example sends 'MEMBER.ONE' as the file name to the remote host.
 PUT LIBRARY/FILE.MEMBER 'MEMBER.ONE'