COMMAND - UFTP configuration option

Description

The COMMAND option specifies the command to be executed by the host.

A COMMAND option command is processed by the FTP Client, which interprets the command and then configures an appropriate command that is then sent to the host server.
 

Note

Protocol-specific commands not supported by COMMAND can be sent directly to the host server using the QUOTE configuration option.


COMMAND option commands are supported by the following protocols:

  • FTP
  • FTPS
  • SFTP
  • TFTP
     

Command

FTP/S

SFTP

TFTP

GET

(tick)

(tick)

(tick)

PUT

(tick)

(tick)

(tick)

MGET

(tick)

(tick)

(tick)*

MPUT

(tick)

(tick)

(tick)

DELETE

(tick)

(tick)


MDELETE

(tick)

(tick)


MKDIR

(tick)

(tick)


RMDIR

(tick)

(tick)


LIST

(tick)

(tick)


FTP/S differs from FTP only in the use of SSL/TLS to provide security. All commands are implemented exactly the same for these protocols.

TFTP is limited to a subset of the available server commands. Additionally, TFTP supports limited MGET functionality. File lists are supported, but regex and wildcard pattern matching are not supported.

Configuration Requirements

The following table identifies the SOURCE and DESTINATION configuration option requirements for each type of Universal FTP Client Command that can be specified by a COMMAND option:
 

Command

SOURCE option

DESTINATION option

GET

required

optional

PUT

required

optional

MGET

required

optional

MPUT

required

optional

DELETE

required


MDELETE

required


MKDIR

required


RMDIR

required


LIST

optional


SOURCE and DESTINATION Endpoints

SOURCE (-src) and DESTINATION (-dst) are the two endpoints involved in a file transfer. The word "endpoint" is used to refer to either a source or a destination. Some operations may only use a single endpoint, the source (see #Configuration Requirements, above).

Endpoints are either files or directories and are represented as strings.

Endpoints use the slash (/) character as a directory separator. Endpoints starting with a slash are "absolute," and are relative to the root of the file system. Endpoints starting with any other character are relative to the user's default directory (home directory). An empty path name is valid, and it refers to the user's default directory (usually the user's home directory).

A file designation may include a directory designation (the path).

An endpoint within a Windows FTP Client should use the backward slash (**) as a directory separator.

An FTP Client running under an operating system other than Windows should use the forward slash (/) as a directory separator.

A source or destination within a remote FTP Server should use the forward slash (/) as a directory separator, regardless of the operating system that the Server is running on.

Sources

Source format is command-dependent.

GET, PUT, DELETE

Source endpoint for these commands must always be a file.

MGET, MPUT, MDELETE

Source endpoint for these commands can be a regular expression (regex), a wildcard pattern, a comma-delimited list of file names, or a single file name (as in GET, PUT, and DELETE).

MKDIR, RMDIR

Source endpoint for these commands must be a directory.

LIST

The optional source endpoint for a LIST command can be a directory, a regular expression (regex), a wildcard pattern, a comma-delimited list of file names, or a single file name. If source is not specified, it defaults to the FTP Server's current working directory.

Destinations

Destination format is command-dependent.

GET, PUT

The optional destination endpoint for these commands can be a file or a directory. If no file name is specified, the transferred file defaults to the name of the source file. If a file name is specified, the transferred file is renamed to the destination file. If no destination is specified, the file is transferred to the current working directory with the same name as the source file.

MGET, MPUT

The optional destination endpoint for these commands must be a directory. Since multiple files can be transferred, each file retains the name of the source file.

DELETE, MDELETE, MKDIR, RMDIR, LIST

These commands never use a destination endpoint.

Usage

Specification Method

Parameter / Value

IBM i

HP NonStop

UNIX

Windows

z/OS

Command Line, Short Form

-c command




Command Line, Long Form

-cmd command

(tick)

(tick)

(tick)

Environment Variable

n/a




Configuration File Keyword

n/a





Value

command is the name of the command to execute.

Valid values: