The SFTP Get activity issues an SFTP get and mget command to the specified server.


The General tab has the following fields.

Field Literal Value/Module Property Description
Name No The name to be displayed as the label for the activity in the process.
SFTP Connection Yes

The path to the shared configuration resource containing the user information such as Host, Port, and User Name.

For configuration details, refer to SFTP Connection.

Quit (post-command) No When this check box is selected, it specifies that the SFTP Connection should be closed after completing this command.

If this check box is not selected, the SFTP Connection remains open so that all SFTP activities specifying the same SFTP Connection, (that is, the same host, port, and username) share the existing SFTP session until the connection is closed.

Use Process Data No

Specify to write contents of the file retrieved from the SFTP server to the process data. The activity’s output includes an element that contains the remote file’s contents, and the data can be used by subsequent activities in the process. When this check box is selected, you can retrieve only one file from the remote server.

Important: You must select this check box to allow the sFTP Get activity to work in TIBCO® Cloud Integration. It is recommended not to specify wildcards in the RemoteFilename input element, when this check box is selected.
Binary No Specifies whether to retrieve the file content in the binary or ASCII mode (selected signifies binary). When the ASCII mode is used, differences inline endings between the SFTP server and the machine executing the SFTP command are automatically handled. Also, the ASCII mode implies text data, and that data can be encoded in a character encoding other than the ASCII(such as UTF-8 or Latin-1).
Overwrite Existing File No

Disabled when the Use Process Data checkbox is selected.

Persist Timestamp while Copy File No Selecting this check box specifies that the original time stamp of file persists while transferring the original/source file from the remote machine to local machine.


Provide a short description for the activity.


The following is the input for the activity.
Input Item Datatype Description
RemoteFilename string

The path and name of the file to retrieve from the remote server. Wildcards (? for any one character, * for one or more characters) are permitted in this field.

Note: Do not specify wildcards for this element, if the Use Process Data check box is selected.
LocalFileName string

This input item specifies the name and path of the local file where the contents of the retrieved file should be written.

Note: This input item is not available when the Use Process Data check box on the General tab is selected.
Host string The name or IP of the SFTP server. This overrides the value specified in the SFTP Connection shared resource.
Port integer The port number for incoming SFTP requests on the SFTP server. This value overrides the value specified in the SFTP Connection shared resource.
UserName string The username for logging into the SFTP server. This overrides the value specified in the SFTP Connection shared resource.
Password password The password for logging into the SFTP server. This overrides the value specified in the SFTP Connection shared resource.
Timeout integer The amount of time to wait for the SFTP server to respond. This timeout is used when the SFTP server places the SFTP connection used by this activity into a waiting state.

This overrides the value specified in the SFTP Connection shared resource. Input Item is Datatype.


The following is the output for the activity.

Output Item Datatype Description
Files Transferred complex

This element contains the name of the remote file that is retrieved. It contains two elements: Name and NumOfBytes.

If an error happens while retrieving a file, the activity output is not available. However, the Fault tab lists the successfully transferred files and the files that failed to be transferred.

ASCII data or Binary data string Available only when Use Process Data check box is selected.
Name string The name of the retrieved remote file.
NumOfBytes integer The number of bytes contained in the associated file name.


The Fault tab lists the possible exceptions that can be thrown by this activity.

Exception When Thrown..
GetFilesException An error occurs during the SFTP get operation.
ConnectionErrorException An error occurs when connecting to the SFTP server.
CommandExecutionException An error occurs when executing the SFTP command.
ConnectionTimeoutException The connection to the SFTP server times out before completing the command execution.