SFTP File Transfer workflow The SFTP File Transfer activity pack includes a scoped workflow that uses multiple activities to manage files on SFTP servers. The maximum activity count for the SFTP File Transfer workflow is set to 10,000. This allows the workflow to move up to 1000 files from one server to another. Accessing the workflow Navigate to Workflow > Workflow Editor and select the Workflows tab. Click on the SFTP File Transfer workflow to open it. Click the information icon in the workflow header to display the properties dialog box. Input variables Table 1. SFTP File Transfer workflow input variables Variable Description Default value Source host Name or IP address of the server containing the files you want to move. Source port Port number to use to communicate with the source server. 22 Source directory Full path to the directory where the source files are located. Source files Names of specific source files to move. 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. Excluded files Names of specific source files to exclude from the move. The system moves 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. Target host Name or IP address of the server to which the files are being moved. Target port Port number to use to communicate with the target host. 22 Datetime format Timestamp format to apply when the $[DateTime] variable is used in the Target directory or Target files field. The system uses the current time from the instance to create timestamp values. yyyy-MM-dd Target directory Path to the directory in the target host where the files are being moved. You can specify a target directory whose name includes the timestamp by adding the $[DateTime] variable to the directory name. For example, you might enter this path to a target directory: /user/jacinto.gawron/documents/projects_$[DateTime]. This produces the projects_20150505 directory. When the timestamp variable is used, the system uses the format specified in the Datetime format field. Target file Format to use for target file names when a timestamp is added. You can configure the system to add the timestamp as a prefix to the file name or insert the timestamp into the name, using these variables: $[DateTime]: Current timestamp, using the format defined in the Datetime format field. $[SourceFile]: Complete file name. $[SourceFile:Base]: Base file name without the extension. $[SourceFile:Ext]: File extension only. A target file name with the timestamp added as a prefix is expressed as: $[DateTime]_$[SourceFile]. This produces a file name that looks like this: 20150505_file1.txtA target file name with the timestamp inserted into the name is expressed as: $[SourceFile:Base]_$[DateTime]$[SourceFile:Ext]. This produces a file name that looks like this: file1_20150505.txt Apply move conditions Check box to apply conditions to the file transfer. If this check box is selected, additional fields appear for setting conditions. false Minimum file size, in bytes Condition that defines a target file's minimum size requirement. This setting can help determine if the file is valid. This field appears when the Apply move conditions check box is selected. 0 Maximum file size, in bytes Condition that defines a target file's maximum size requirement. This field appears when the Apply move conditions check box is selected. -1 File is not older than Condition that sets the earliest acceptable date for this file's age range. The range starts at 00:00 (midnight) on the date specified. This field appears when the Apply move conditions check box is selected. File is not newer than Condition that sets the latest acceptable date for this file's age range. The range ends at 23:59 on the date specified. This field appears when the Apply move conditions check box is selected. Include subfolders Check box to move 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. Move order Order in which the files are moved from the source to the target. The possible options are: None (same order as files in the source directory) By timestamp By file name By file size Sort order Order in which the files are sorted in the target directory, using the option selected in the Move order field. Sorting options are Ascending and Descending. desc Maximum number of retries Number of attempts the activity can make to connect to the target host or to move a file before timing out. When the retry limit to move a file or to connect to the host is exceeded, the system logs a failure. If the maximum number of failures is not exceeded, the system attempts to connect again or to move the next file named. 2 Time between retries, in seconds Time, in seconds, between repeat attempts to connect to the target or to begin moving a file. 10 Maximum number of failures Acceptable number of times the system can fail to connect to the target host or to move a file before it quits trying. A failure occurs when the number of configured retries is exceeded. Using the default settings, failure occurs when the system cannot connect to the target or move a file after two retries. 0 Duplicate file action Action to take if a file being moved already exists in the target directory. The choices are: Overwrite if file exists (default) Rename with index Do not move overwrite Preserve file attributes Check box to use the time stamp and mode information from the source files for the copied files. If this check box is cleared, the copied files have a current time stamp and mode.Note: This timestamp is a file attribute and is not appended to the file name. false Upon success, remove files from source Check box to delete original files from the source directory when they are copied to the new location. Clear this check box to keep the source files in their current location in the source host. false Upon failure, keep moved files on target Check box to keep any files on the target that were moved successfully, even if the entire file transfer operation ended in failure. If this check box is cleared, the system removes all successfully transfered files from the target when general failure occurs. true Credential tag for source Specific credential tag this activity must use to run SSH commands on the source host. Credential tag for target Specific credential tag this activity must use to run SSH commands on the target host. File selection logic When selecting the files to move from the source host, the system uses this logic: If the Source files and Excluded files fields are empty, the system moves all the files in the source directory. When the Include subfolders check box is selected, the following dependencies exist: If no files are specified in the Source files and Exclude files fields, the system moves all files in the source directory and all files in all subfolders of the source directory. If the Source files field contains file names, the system moves those files from their location on either the source directory or any of its subfolders. If the Exclude files field contains file names, the system moves all the files from the source directory and its subfolders except those excluded files. When the Include subfolders check box is cleared, the system looks only in the source directory for files to move or exclude.