You can use default source and target file names for some subcommands;
however, you must specify a file name for other subcommands.
The FTP client provides a default file name if the target file
name for the PUT, APPEND, and GET subcommands is omitted. Because you can
specify source file names for the MPUT and MGET subcommands, the FTP server
also generates target file names for MPUT and MGET. See the following Data
Transfer Subcommands table for the syntax of these subcommands. The table
column labeled Target is the parameter for which a default name is
provided.
Subcommand |
Source |
Target |
Other |
APPEND |
local filename |
[server filename] |
|
PUT |
local filename |
[server filename] |
|
GET |
server filename |
[local file name] |
[(Replace] |
MPUT |
local filename |
|
|
MGET |
server filename |
|
[(Replace] |
PUT and APPEND subcommands
For the PUT and APPEND
subcommands, the rules for forming default names are divided into two categories:
- iSeries™ server
case
- If the target file system is a library file system or a document library
system, the default name complies with the naming rules for these systems,
including their name format.
- If the target file system is neither a library file system nor a document
file system it is one of two names:
- The default name is the name after the last slash in the source file name
- The same as the source file name if there is no slash.
- Non-iSeries server case
- If the source file is a library file system file, then the default name
consists of the file name.member name. If there is no member name,
the file name is the default name.
- If the source file is a document library services file, the default name
is the file name and the extension.
- If the source file is neither a library file system nor a document library
services file, the name after the last slash in the source name is the default
name. If there is no slash, the default name is the same as the source name.
If the server is an iSeries server, then the server generates the default
name in these subcommands using the same rules as applied for the PUT subcommand.
GET and MGET subcommand
If the server is not an iSeries server,
it bases the default name for the GET and MGET subcommands on the part of
the source name that follows the last slash. If there is no slash, the entire
source name is the default name. Here are the rules for forming default names:
- If the client file system is the library file system (iSeries database),
these rules apply:
- If the remote file name contains a period (.), the characters preceding
the period are truncated to 10 characters to form the local file name. The
characters after the period are truncated to 10 characters to form the member
name.
- If the remote file name does not contain a period, both file and member
names are set to the remote file name truncated to 10 characters to form the
local file name.
- If the name format is 1, the server adds the appropriate extensions to
the file and member parts of the name.
- If the client file system is document library services, these rules
apply:
- If the remote name contains a period, the characters preceding the period
are truncated to 8 characters. The characters after the period are truncated
to 3 characters.
- If the remote name does not contain a period, the name is truncated to
8 characters without an extension.
- For other file systems, the name after the last slash in the remote name
is the default name.
Notes: - Save files do not have members, so default names for save files do not
have a member part.
- The server displays the default names when the DEBUG mode is on.
More details on syntax:
FTP client syntax conventions
Naming files for transfer
The FTP client subcommands
that you use for transferring data can have a localfile or
a remotefile parameter or both. You can use these
parameters to name the data you want to transfer. The transfer subcommands
are:
- APPEND localfile [remotefile]
- DELETE remotefile
- GET remotefile [localfile]
- MDELETE remotefiles
- MGET remotefiles
- MPUT localfiles
- PUT localfile [remotefile]
The names for the localfile and remotefile parameters can be either
partially qualified or fully qualified. A partially-qualified name includes
the name of the data itself as well as one or more names in the hierarchical
sequence above the data. A fully-qualified name includes all names in the
hierarchical sequence above the data.
When the name is partially qualified,
the current working directory identifies the file to be processed. You can
set the working directory on the local client system with the LCD subcommand.
You can set the working directory on the remote server system with the CD
subcommand.
The format of the localfile name parameters must conform
to iSeries file
naming rules. The remotefile names must adhere to the file naming rules of
the remote system.
More details on syntax:
- Enclosing subcommand parameters: You can use either a single quotation
mark (') or quotation marks (") to enclose parameters.
- FTP client syntax conventions: FTP client subcommands make use of these
syntax conventions.