Configure the SFTP execution command

Use the input variables you created to configure the command that Orchestration executes on the SFTP target.

Before you begin

Create the input variables you need in the Inputs form before you can advance to the Execution Command stage.

Role required: activity_creator, admin

Note: You can test the JDBC connection between the MID Server and the target without having to run the activity in a workflow context. For details, see Test JDBC activity template inputs.

Procedure

  1. Drag variables from the list of inputs and drop them into command fields.
    The system formats the variable in the proper syntax for the command.
    Figure 1. SFTP execution command
  2. Complete the fields shown in the table.
    Table 1. SFTP command fields
    Field Description Command
    Command Type of activity to create. The choices are:
    • Copy file
    • Create directory
    • Get file list
    • Remove file or directory
    • Rename file or directory
    • Set file attributes
    Note: The fields displayed on the form depend on the command selected.
    All
    Source host Name or IP address of the server containing the files targeted by the activity. All
    Source port Port number to use to communicate with the source server. The default port number is 22. All
    Source file path Full path to a file on a source host.
    • Copy file
    • Remove file or directory
    • Set file attributes
    Source directory Path to the directory where the source files are located.
    • Create directory
    • Get file list
    Source files Names of specific source files to include in the management action. Separate the file names in this list with semi-colons. This field supports the use of wild cards. If this field is blank, all files are included. For information about how the values in this field are affected by options in other fields, see the section below the table. Get file list
    Is a directory Check box that determines if the specified file path is a directory. Remove file or directory
    Credential tag for source Specific credential tag this activity must use to run SFTP commands on the source host. All
    Credential tag for target Specific credential tag this activity must use to run SFTP commands on the target host. Copy file
    Excluded files Names of specific source files to exclude from the management action. The activity acts on all other files found in the source directory or subfolders. Separate the file names in this list with semi-colons. This field supports the use of wild cards. For information about how the values in this field are affected by options in other fields, see the section below the table. Get file list
    Include subfolders Check box to manage the files from subfolders in the source directory. For information about how your selection affects other fields in the form, see the section below the table. Get file list
    Target host Name or IP address of the server to which the files are being transferred. Copy file
    Target port Port number to use to communicate with the target host. The default port number is 22. Copy file
    Target file path Full path to a file on a target host.
    • Copy file
    • Rename file or directory
    Suffix for temporary file Temporary suffix to use for a file name if the file already exists on a target host. If this field contains a value, the activity deletes the duplicate target file if it exists, and then copies the source file to a temporary file using targetFilePath + tempFileSuffix as the name. Upon completion, the activity renames the file to the actual target file name. If this field is blank, the activity copies the source file directly to the target file and overwrites it, if it already exists. Copy file
    UID User ID attribute to apply to a file or directory. The UID and GID values must be set together as a pair or they are ignored. Set file attributes
    GID Group ID attribute to apply to a file or directory. The UID and GID values must be set together as a pair or they are ignored. Set file attributes
    Permissions File or directory permissions to set for the user and group specified. This value must be expressed as an integer, such as 16877, which defines these permissions: rwxr-xr-x. The permissions number is an internal value returned by the Get File List activity. The best practice is to first use the Get File List activity to return a list of files and their attributes. Then you can move a file from a source host to a target host and set the source file attributes on the target file. This is demonstrated in the SFTP File Transfer workflow. Set file attributes
    Access timestamp Override the timestamp when the file or directory was last accessed. The access and modification timestamps must be set together as a pair. Set file attributes
    Modification timestamp Override the timestamp when the file or directory was last modified. The access and modification timestamps must be set together as a pair. Set file attributes
    Size in bytes Size of a file, expressed in bytes. Set file attributes
    Required MID Server capabilities MID Server with the appropriate capabilities for connecting to the source and target servers. By default, the system selects an SSH MID Server. All
    The system uses this logic to determine which files to move from the source host:
    • If the Source files field is empty, the system select all the files in the source directory. Otherwise, it only selects those files whose names match one of the file name patterns given in the field.
    • If the Excluded files field is empty, the system excludes nothing. Otherwise, it excludes those files whose names match one of the file name patterns given in the field.
    • The exclude rule has a higher preference than the include rule. A file whose name matches one of the file name patterns in the Excluded files field does not get into the selection, even though it would be selected by the include rule.
    • When the Include subfolders check box is cleared, the system looks only in the source directory for files to include or exclude. Otherwise, it looks in the source directory and any of its subfolders for files to include or exclude.
  3. Click Save.
  4. Click Continue to advance to the Outputs stage.