SFTP Dir
The SFTP Dir activity provides a list of files in the specified directory of the SFTP server.
General
The General tab has the following fields.
| Field | Literal Value/Module Property | Visual Difference? | Description |
|---|---|---|---|
| Name | No | Yes | The name to be displayed as the label for the activity in the process. |
| SFTP Connection | Yes | Yes |
The path to the shared configuration resource containing the user information such as Host, Port, and User Name, Private Key or Password, and Known Host File. For configuration details, refer to SFTP Connection. |
| Quit (post-command) | No | Yes | 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. |
| Show Short File Names | No | Yes | Select this check box to view the file names only as a list.
If the check box is not selected, the specified detailed information about the files and directories is visible. |
| List .(current) and ..(parent) Directories | No | Yes | Select this checkbox to view the current directory and parent directory in output tab as result. If you do not select this option, then current directory (.) and parent (..) will not be listed in the result in the output tab of the activity. By default, the checkbox is selected. |
Description
In the Description tab, you can enter a short description for the SFTP Dir activity.
Input
The following is the input for the activity.
| Input Item | Datatype | Description |
|---|---|---|
| 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 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. |
| PrivKey | string | The private key’s absolute or relative path to authenticate your login. This overrides the value specified in the SFTP Connection shared resource. |
| PrivKeyPass | password | The password of the private key, if using the PrivKey authentication or two factor authentication method to log on to SFTP server. This overrides the value specified in the SFTP Connection shared resource. |
| Proxy Host | string | Specifies the host name or IP address of the proxy server. |
| Proxy Port | integer | Specifies the port number of the proxy server. |
| Proxy User Name | string | Specifies the user name used to connect to the proxy server, if necessary. |
| Proxy Password | password |
Specifies the password for the specified user name when connecting to the proxy server, if necessary. |
| Directory | string | The path to the directory for which you want to list the files and directory. This parameter is optional, and if null, lists the current remote directory. |
| 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. |
Output
The following is the output for the activity.
| Output Item | Datatype | Description |
|---|---|---|
| ItemCount | integer | The number of entries returned from the remote directory listing. |
| DirectoryItems | string | A repeating element containing the list of files returned. |
Fault
The Fault tab lists the possible exceptions that can be thrown by this activity.
| Exception | Thrown When... |
|---|---|
| CommandExecutionException | An error occurs when executing the SFTP command. |
| ConnectionErrorException | An error occurs when connecting to the SFTP server. |