{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21970,"path":"integrate-applications/orchestration/t_CreateAnSFTPActivity.md","title":"Create an SFTP activity","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create an SFTP activity\n\nCreate an activity that executes basic SFTP commands on a remote server.\n\n## Before you begin\n\nRoles required: activity\\_creator or workflow\\_admin\n\n## About this task\n\nYou can create a custom activity that manages files and directories on a target host or copies a file from one SFTP server to another. The file content is streamed through a MID Server, which avoids having to store the data on the hard drive of the MID Server host machine.\n\n**Note:** This activity requires the credentials of a user who can execute SFTP commands on the source host. The [Copy File](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/r_CopyFileActivity.md) activity, provided in the activity pack, requires separate credentials to access the target host.\n\n## Procedure\n\n1.  Create a [custom activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/create-custom-activities.md).\n\n    This action creates a custom activity using a template.\n\n2.  After setting up [general properties](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/General-Flds-Templates.md) and [creating input variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/CreateInputVariables.md), configure the SFTP Execution Command.\n\n<table id=\"choicetable_zmw_zbr_vz\"><tbody><tr><td id=\"d596453e120\">\n\n**Command**\n\n</td><td>\n\nType of activity to create. The choices are:-   Copy file\n-   Create directory\n-   Get file list\n-   Remove file or directory\n-   Rename file or directory\n-   Set file attributes\n **Note:** The fields that display on the form depend on the command you select.\n\n</td></tr><tr><td id=\"d596453e155\">\n\n**Source host**\n\n</td><td>\n\nName or IP address of the server containing the files targeted by the activity.\n\n</td></tr><tr><td id=\"d596453e164\">\n\n**Source port**\n\n</td><td>\n\nPort number to use to communicate with the source server. The default port number is **22**.\n\n</td></tr><tr><td id=\"d596453e176\">\n\n**Source file path**\n\n</td><td>\n\nFull path to a file \\(`/temp/test_data_file.txt`\\) or directory \\(/`temp/test_dir`\\) on a source host depending on the selected command. Field available on following commands: -   Copy file\n-   Remove file or directory\n-   Set file attributes\n\n\n</td></tr><tr><td id=\"d596453e203\">\n\n**Source directory**\n\n</td><td>\n\nPath to the directory where the source files are located. Field available on following commands: -   Create directory\n-   Get file list\n\n\n</td></tr><tr><td id=\"d596453e222\">\n\n**Source files**\n\n</td><td>\n\nNames of specific source files to include in the file transfer. Separate the file names with semi-colons. This field supports a semi-colon separated list of wild-card patterns. For example: `*.txt; a?cd.pdf.` If this field is blank, all files are included. Field available on following command: Get file list**Note:** For information about how the values in this field affect options in other fields, see the logic explanation which follows.\n\n</td></tr><tr><td id=\"d596453e237\">\n\n**Is a directory**\n\n</td><td>\n\nIf checked, specifies the file path is a directory. Field available on following command: Remove file or directory\n\n</td></tr><tr><td id=\"d596453e246\">\n\n**Credential tag for source**\n\n</td><td>\n\nSpecific credential tag this activity must use to run SFTP commands on the source host.\n\n</td></tr><tr><td id=\"d596453e255\">\n\n**Credential tag for target**\n\n</td><td>\n\nSpecific credential tag this activity must use to run SFTP commands on the target host. Field available on following command: Copy file\n\n</td></tr><tr><td id=\"d596453e264\">\n\n**Excluded files**\n\n</td><td>\n\nNames of specific source files to exclude from the file transfer. The activity acts on all other files found in the source directory or subfolders. Separate the file names with commas. This field supports comma-separated list of wild-card patterns. For example: `*.txt, a?cd.pdf.`. Field available on following command: Get file list **Note:** For information about how the values in this field affect options in other fields, see the logic explanation which follows.\n\n</td></tr><tr><td id=\"d596453e279\">\n\n**Include subfolders**\n\n</td><td>\n\nIf checked, includes the files from subfolders in the source directory. Field available on following command: Get file list **Note:** For information about how your selection affects other fields in the form, see the logic explanation which follows.\n\n</td></tr><tr><td id=\"d596453e292\">\n\n**Target host**\n\n</td><td>\n\nName or IP address of the server to which the files are being transferred. Field available on following command: Copy file\n\n</td></tr><tr><td id=\"d596453e301\">\n\n**Target port**\n\n</td><td>\n\nPort number to use to communicate with the target host. The default port number is **22**. Field available on following command: Copy file\n\n</td></tr><tr><td id=\"d596453e313\">\n\n**Target file path**\n\n</td><td>\n\nFull path to a file on a target host. Field available on following commands: -   Copy file\n-   Rename file or directory\n\n\n</td></tr><tr><td id=\"d596453e331\">\n\n**Suffix for temporary file**\n\n</td><td>\n\nIf a file exists on a target host, this command enables a temporary suffix to use for a file name. If this field contains a value, the activity first copies the source file to a temporary file on the target host 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 exists. Field available on following command: Copy file\n\n</td></tr><tr><td id=\"d596453e343\">\n\n**UID**\n\n</td><td>\n\nUser 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. The UID and GID numbers are internal values returned by the Get File List activity. Typically, you 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 flow is demonstrated in the [SFTP File Transfer workflow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/r_SFTPWorkflow.md). Field available on following command: Set file attributes\n\n</td></tr><tr><td id=\"d596453e359\">\n\n**GID**\n\n</td><td>\n\nGroup 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. The UID and GID numbers are internal values returned by the Get File List activity. Typically, you 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 flow is demonstrated in the [SFTP File Transfer workflow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/r_SFTPWorkflow.md). Field available on following command: Set file attributes\n\n</td></tr><tr><td id=\"d596453e376\">\n\n**Permissions**\n\n</td><td>\n\nFile 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 numbers are internal values returned by the Get File List activity. Typically, you 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 flow is demonstrated in the [SFTP File Transfer workflow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/r_SFTPWorkflow.md). Field available on following command: Set file attributes\n\n</td></tr><tr><td id=\"d596453e398\">\n\n**Access timestamp**\n\n</td><td>\n\nOverride the timestamp when the file or directory was last accessed. The access and modification timestamps must be set together as a pair. Field available on following command: Set file attributes\n\n</td></tr><tr><td id=\"d596453e407\">\n\n**Modification timestamp**\n\n</td><td>\n\nOverride the timestamp when the file or directory was last modified. The access and modification timestamps must be set together as a pair. Field available on following command: Set file attributes\n\n</td></tr><tr><td id=\"d596453e416\">\n\n**Size in bytes**\n\n</td><td>\n\nSize of a file, expressed in bytes. Field available on following command: Set file attributes\n\n</td></tr><tr><td id=\"d596453e425\">\n\n**Required MID Server capabilities**\n\n</td><td>\n\nMID Server with the appropriate [MID Server capabilities](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/t_ConfigureCapabilities.md) for connecting to the source and target servers.\n\n</td></tr></tbody>\n</table>    The system uses this logic to determine which files to move from the source host:\n\n    -   If the Source files field is empty, the system selects 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.\n    -   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.\n    -   The exclude rule has a higher preference than the include rule. If a file name matches one of the file name patterns in the Excluded files field, it does not get into the selection regardless of the include rule.\n    -   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.\n    **Note:** You can map parameter values in a test payload to variables in the **Outputs** tab automatically. See [automap output variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/automap-output-variable-inputs.md).\n\n\n## What to do next\n\n-   Use [auto-mapping](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/automap-output-variable-inputs.md) to generate outputs and parsing rules \\(recommended for JDBC\\)\n-   If you do not use auto-mapping, you can manually [create output variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/t_CreateAnOutputVariable.md) and [create parsing rules](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/t_CreateAParsingRule.md)\n\n**Parent Topic:**[Orchestration custom activity templates](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/c_ActivityDesignerComponents.md)\n\n## SFTP template execution parameters\n\nYou use execution parameters to create the input process script in the **Preprocessing** form.\n\nFor descriptions of the command fields, see [Configure the SFTP execution command](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/t_CreateAnSFTPActivity.md).\n\n**Note:** You must use the `executionParam.` prefix with all variables in this table.\n\n<table id=\"table_wl1_yxc_dr\"><thead><tr><th>\n\nName\n\n</th><th>\n\nVariable\n\n</th><th>\n\nType\n\n</th><th>\n\nUsage\n\n</th></tr></thead><tbody><tr><td>\n\nCommand\n\n</td><td>\n\ncommand\n\n</td><td>\n\nString\n\n</td><td>\n\nIdentifies the function of this activity. The possible commands are: -   Copy file\n-   Create directory\n-   Get file list\n-   Remove file or directory\n-   Rename file or directory\n-   Set file attributes\n\n</td></tr><tr><td>\n\nSource\n\n</td><td>\n\nsource\n\n</td><td>\n\nString\n\n</td><td>\n\nIdentifies the source host.\n\n</td></tr><tr><td>\n\nSource port\n\n</td><td>\n\nsource\\_port\n\n</td><td>\n\nInteger\n\n</td><td>\n\nIdentifies the port used to communicate with the source host.\n\n</td></tr><tr><td>\n\nSource directory\n\n</td><td>\n\nsource\\_directory\n\n</td><td>\n\nString\n\n</td><td>\n\nPath to the source directory of the files to be moved.\n\n</td></tr><tr><td>\n\nSource files\n\n</td><td>\n\nsource\\_files\n\n</td><td>\n\nString\n\n</td><td>\n\nNames of the files on the source to be moved.\n\n</td></tr><tr><td>\n\nExcluded files\n\n</td><td>\n\nexcluded\\_files\n\n</td><td>\n\nString\n\n</td><td>\n\nLists the files excluded from the operation.\n\n</td></tr><tr><td>\n\nSource file path\n\n</td><td>\n\nsource\\_file\\_path\n\n</td><td>\n\nString\n\n</td><td>\n\nPath to the source files to be moved.\n\n</td></tr><tr><td>\n\nTarget host\n\n</td><td>\n\ntarget\\_host\n\n</td><td>\n\nString\n\n</td><td>\n\nIdentifies the target host.\n\n</td></tr><tr><td>\n\nTarget port\n\n</td><td>\n\ntarget\\_port\n\n</td><td>\n\nInteger\n\n</td><td>\n\nIdentifies the port used to communicate with the target host.\n\n</td></tr><tr><td>\n\nTarget directory\n\n</td><td>\n\ntarget\\_directory\n\n</td><td>\n\nString\n\n</td><td>\n\nFull path to the target directory on the target host.\n\n</td></tr><tr><td>\n\nTarget file path\n\n</td><td>\n\ntarget\\_file\\_path\n\n</td><td>\n\nString\n\n</td><td>\n\nFull path to a file or directory on the source host or on the target host. For example, this value is used in the [Rename File or Directory](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/r_RenameFileOrDirectoryActivity.md) activity in the activity pack.\n\n</td></tr><tr><td>\n\nTemp file postfix\n\n</td><td>\n\ntemp\\_file\\_postfix\n\n</td><td>\n\nString\n\n</td><td>\n\nTemporary file name extension used by the Copy File activity when moving a file. If this field contains an extension, the source file is copied to a temporary file using **target file name + temp\\_file\\_postfix**, before being renamed to the actual target file. If this field is blank, the source file is copied directly to the target file.\n\n</td></tr><tr><td>\n\nIs directory\n\n</td><td>\n\nis\\_directory\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nIndicates whether the given file path is a directory.\n\n</td></tr><tr><td>\n\nInclude subfolders\n\n</td><td>\n\ninclude\\_subfolders\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nIndicates whether the system looks into subfolders of the source directory for files to include and exclude.\n\n</td></tr><tr><td>\n\nFile attribute uid\n\n</td><td>\n\nfile\\_attribute\\_uid\n\n</td><td>\n\nInteger\n\n</td><td>\n\nUser ID associated with a file or directory.\n\n</td></tr><tr><td>\n\nFile attribute gid\n\n</td><td>\n\nfile\\_attribute\\_gid\n\n</td><td>\n\nInteger\n\n</td><td>\n\nGroup ID associated with a file or directory.\n\n</td></tr><tr><td>\n\nFile attribute permissions\n\n</td><td>\n\nfile\\_attribute\\_permissions\n\n</td><td>\n\nInteger\n\n</td><td>\n\nFile or directory permissions for the user and group specified.\n\n</td></tr><tr><td>\n\nFile attribute atime\n\n</td><td>\n\nfile\\_attribute\\_atime\n\n</td><td>\n\nInteger\n\n</td><td>\n\nAccess time stamp from the file attributes.\n\n</td></tr><tr><td>\n\nFile attribute mtime\n\n</td><td>\n\nfile\\_attribute\\_mtime\n\n</td><td>\n\nInteger\n\n</td><td>\n\nModification time stamp from the file attributes.\n\n</td></tr><tr><td>\n\nFile attribute size\n\n</td><td>\n\nfile\\_attribute\\_size\n\n</td><td>\n\nInteger\n\n</td><td>\n\nSize of the file, in bytes.\n\n</td></tr><tr><td>\n\nSource credential tag\n\n</td><td>\n\nsource\\_credential\\_tag\n\n</td><td>\n\nString\n\n</td><td>\n\n[Credential aliases for Orchestration activities](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/c_AssignCredsOrchActivities.md) used to run the command on the source host.\n\n</td></tr><tr><td>\n\nTarget credential tag\n\n</td><td>\n\ntarget\\_credential\\_tag\n\n</td><td>\n\nString\n\n</td><td>\n\nCredential tag used to run the command on the target host.\n\n</td></tr><tr><td>\n\nMidCapabilities\n\n</td><td>\n\nmidCapabilities\n\n</td><td>\n\nString \\(comma separated\\)\n\n</td><td>\n\nList of required MID Server capabilities.\n\n</td></tr></tbody>\n</table>## SFTP post-processing parameters and payload parsing\n\nUse these parameters to create a post-processing script, payload parsing, and tagging.\n\n<table id=\"table_xlq_3n5_cr\"><thead><tr><th>\n\nName\n\n</th><th>\n\nVariable\n\n</th><th>\n\nType\n\n</th><th>\n\nUsage\n\n</th></tr></thead><tbody><tr><td>\n\nOutput\n\n</td><td>\n\noutput\n\n</td><td>\n\nString\n\n</td><td>\n\nContains output data returned by the query.\n\n</td></tr><tr><td>\n\nEccSysId\n\n</td><td>\n\neccSysId\n\n</td><td>\n\nString\n\n</td><td>\n\nContains the Reference ID associated with the ECC Queue input message.\n\n</td></tr><tr><td>\n\nErrorMessages\n\n</td><td>\n\nerrorMessages\n\n</td><td>\n\nString\n\n</td><td>\n\nContains the error messages returned from the query. If no error messages are returned, this value is null.\n\n</td></tr><tr><td>\n\nTags\n\n</td><td>\n\ntags\n\n</td><td>\n\nHashmap of tag values returned from the SSH command\n\n</td><td>\n\nContains the tags used to extract output using the SSH commands. The tag output is delimited by double percentage signs, as in `%%tagname%% … %%`. Set up the command using the following format:```\n%%tagname1%%\noutput1 line 1\noutput1 line 2\n…\n%%\n\n%%tagname2%%\noutput2 line 1\noutput2 line 2\n…\n%%\n```\n\nThe tags returned are JavaScript hashmap objects in which each key is prefixed with `tag` appended with the tagname.```\n{\"__text__\": \"\", \n\"tagtagname1\":\"output1 line1\\noutput1 line2\\n\", \n\"tagtagname2\":\"output2 line1\\noutput2 line2\\n\"}\n```\n\n</td></tr></tbody>\n</table>## Configure the SFTP execution command\n\nUse the input variables you created to configure the command that Orchestration executes on the SFTP target.\n\n### Before you begin\n\nCreate the input variables you need in the **Inputs** form before you can advance to the **Execution Command** stage.\n\nRole required: activity\\_creator, admin\n\n**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 template outputs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/CreateInputVariables.md).\n\n### Procedure\n\n1.  Drag variables from the list of inputs and drop them into command fields.\n\n    The system formats the variable in the proper syntax for the command.\n\n    \\[Omitted image \"SFTPExecutionCommand.png\"\\] Alt text: In this example, the Create directory command displays in the Command field.\n\n2.  Complete the fields shown in the table.\n\n<table id=\"table_zmv_v25_cr\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th><th>\n\nCommand\n\n</th></tr></thead><tbody><tr><td>\n\nCommand\n\n</td><td>\n\nType of activity to create. The choices are:-   Copy file\n-   Create directory\n-   Get file list\n-   Remove file or directory\n-   Rename file or directory\n-   Set file attributes\n **Note:** The fields displayed on the form depend on the command selected.\n\n</td><td>\n\nAll\n\n</td></tr><tr><td>\n\nSource host\n\n</td><td>\n\nName or IP address of the server containing the files targeted by the activity.\n\n</td><td>\n\nAll\n\n</td></tr><tr><td>\n\nSource port\n\n</td><td>\n\nPort number to use to communicate with the source server. The default port number is **22**.\n\n</td><td>\n\nAll\n\n</td></tr><tr><td>\n\nSource file path\n\n</td><td>\n\nFull path to a file on a source host.\n\n</td><td>\n\n-   Copy file\n-   Remove file or directory\n-   Set file attributes\n\n\n</td></tr><tr><td>\n\nSource directory\n\n</td><td>\n\nPath to the directory where the source files are located.\n\n</td><td>\n\n-   Create directory\n-   Get file list\n\n\n</td></tr><tr><td>\n\nSource files\n\n</td><td>\n\nNames 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.\n\n</td><td>\n\nGet file list\n\n</td></tr><tr><td>\n\nIs a directory\n\n</td><td>\n\nCheck box that determines if the specified file path is a directory.\n\n</td><td>\n\nRemove file or directory\n\n</td></tr><tr><td>\n\nCredential tag for source\n\n</td><td>\n\nSpecific [Credential aliases for Orchestration activities](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/c_AssignCredsOrchActivities.md) this activity must use to run SFTP commands on the source host.\n\n</td><td>\n\nAll\n\n</td></tr><tr><td>\n\nCredential tag for target\n\n</td><td>\n\nSpecific credential tag this activity must use to run SFTP commands on the target host.\n\n</td><td>\n\nCopy file\n\n</td></tr><tr><td>\n\nExcluded files\n\n</td><td>\n\nNames 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.\n\n</td><td>\n\nGet file list\n\n</td></tr><tr><td>\n\nInclude subfolders\n\n</td><td>\n\nCheck 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.\n\n</td><td>\n\nGet file list\n\n</td></tr><tr><td>\n\nTarget host\n\n</td><td>\n\nName or IP address of the server to which the files are being transferred.\n\n</td><td>\n\nCopy file\n\n</td></tr><tr><td>\n\nTarget port\n\n</td><td>\n\nPort number to use to communicate with the target host. The default port number is **22**.\n\n</td><td>\n\nCopy file\n\n</td></tr><tr><td>\n\nTarget file path\n\n</td><td>\n\nFull path to a file on a target host.\n\n</td><td>\n\n-   Copy file\n-   Rename file or directory\n\n\n</td></tr><tr><td>\n\nSuffix for temporary file\n\n</td><td>\n\nTemporary 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.\n\n</td><td>\n\nCopy file\n\n</td></tr><tr><td>\n\nUID\n\n</td><td>\n\nUser 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.\n\n</td><td>\n\nSet file attributes\n\n</td></tr><tr><td>\n\nGID\n\n</td><td>\n\nGroup 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.\n\n</td><td>\n\nSet file attributes\n\n</td></tr><tr><td>\n\nPermissions\n\n</td><td>\n\nFile 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. Typically, you 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/orchestration/r_SFTPWorkflow.md).\n\n</td><td>\n\nSet file attributes\n\n</td></tr><tr><td>\n\nAccess timestamp\n\n</td><td>\n\nOverride the timestamp when the file or directory was last accessed. The access and modification timestamps must be set together as a pair.\n\n</td><td>\n\nSet file attributes\n\n</td></tr><tr><td>\n\nModification timestamp\n\n</td><td>\n\nOverride the timestamp when the file or directory was last modified. The access and modification timestamps must be set together as a pair.\n\n</td><td>\n\nSet file attributes\n\n</td></tr><tr><td>\n\nSize in bytes\n\n</td><td>\n\nSize of a file, expressed in bytes.\n\n</td><td>\n\nSet file attributes\n\n</td></tr><tr><td>\n\nRequired MID Server capabilities\n\n</td><td>\n\nMID Server with the appropriate [MID Server capabilities](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/t_ConfigureCapabilities.md) for connecting to the source and target servers. By default, the system selects an SSH MID Server.\n\n</td><td>\n\nAll\n\n</td></tr></tbody>\n</table>    The system uses this logic to determine which files to move from the source host:\n\n    -   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.\n    -   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.\n    -   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.\n    -   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.\n3.  Click **Save**.\n\n4.  Click **Continue** to advance to the **Outputs** stage.\n\n\n"}}