{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":4023,"path":"build-workflows/workflow-studio/copy-files-instace.md","title":"Copy Files To This Instance","bundle":null,"doc_type":null,"release":"australia","body":"\n# Copy Files To This Instance\n\nAttaches the specified files in the SFTP server to the specified record in ServiceNow instance.\n\n<table id=\"table_ypp_krp_nnb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td colspan=\"2\">\n\nConnections\n\n</td></tr><tr><td>\n\nConnection\n\n</td><td>\n\nType of connection to use to connect to the source SFTP server.-   **Define Connection Inline**: Define connection information within the action step.\n-   **Use Connection Alias**: Define connection information using the Connection Alias table. Using an alias eliminates the need to configure multiple credentials and connection information profiles when using an action in multiple environments. Likewise, if the connection information changes, you don't need to update your custom action.\n\n To learn more about connections and credentials, see [Introduction to credentials, connections, and aliases](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/credentials-connections-alias.md).\n\n</td></tr><tr><td>\n\nConnection Alias\n\n</td><td>\n\nConnection &amp; Credential alias record that the system uses to run the action step. Users with the flow\\_designer or admin role can create or select an associated Connection record. Using an alias eliminates the need to configure multiple credentials and connection information profiles when using an action in multiple environments. Likewise, if the connection information changes, you don't need to update your custom action. To learn more about connections and credentials, see [credentials, connections, and aliases](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/credentials-connections-alias.md). The credential value is displayed as a Password \\(2 Way Encrypted\\) data pill on the data panel. This field is available when **Use Connection Alias** is selected from the Connection list.\n\n</td></tr><tr><td>\n\nCredential Alias\n\n</td><td>\n\nCredential alias that the system uses to run the action step. Users with the flow\\_designer or admin role can create or select an associated Connection record. Using an alias eliminates the need to configure multiple credentials when using an action in multiple environments. Likewise, if the credential information changes, you don't need to update your custom action. To learn more about connections and credentials, see [credentials, connections, and aliases](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/credentials-connections-alias.md). The credential value is displayed as a Password \\(2 Way Encrypted\\) data pill on the data panel. This field is available when **Define Connection Inline** is selected from the Connection list.**Note:** The SFTP step requires a credential record that supports either SSH private key credentials or SSH credentials. This step does not support Windows credentials where the **Use MID Server service account** option is selected.\n\n</td></tr><tr><td>\n\nHost\n\n</td><td>\n\nName or IP address of the SFTP server to which the files you should be copied. This field is available when **Define Connection Inline** is selected from the Connection list.\n\n</td></tr><tr><td>\n\nPort\n\n</td><td>\n\nPort number to communicate with the server. This field is available when **Define Connection Inline** is selected from the Connection list.\n\n</td></tr><tr><td>\n\nMID Selection\n\n</td><td>\n\nOption to select a specific MID Server or MID Cluster. Choose any one of the following options. -   **Auto-Select MID Server**: Your ServiceNow instance selects the MID Server without manual input.\n-   **Specific MID Server**: Your ServiceNow instance uses MID Server that you specify.\n-   **Specific MID Cluster**: Your ServiceNow instance uses the MID Cluster that you specify.\n\nA MID Cluster is a group of MID Servers that enables your ServiceNow instance to handle multiple integrations, and improve integration speed. For more information, see [Configure a MID Server cluster](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/t_ConfigureAMIDServerCluster.md).\n\n\n This field is available when **Define Connection Inline** is selected from the Source Connection list.\n\n</td></tr><tr><td>\n\nMID Server\n\n</td><td>\n\nSpecific MID Server to run the SFTP step. This field is available when **Specific MID Server** is selected from the MID Selection list.\n\n</td></tr><tr><td>\n\nMID Cluster\n\n</td><td>\n\nData pill for the MID Cluster you want to use. This field is available when **Define Connection Inline** is selected from the Source Connection list, and **Specific MID Cluster** is selected from the MID Selection list.\n\n</td></tr><tr><td>\n\nMID Application\n\n</td><td>\n\nOption to use a MID Server to run the SFTP step. This field is available when **Define Connection Inline** is selected from the Connection list and **Auto-Select MID Server** is selected from the MID Selection list.\n\n</td></tr><tr><td>\n\nCapabilities\n\n</td><td>\n\nCapability of the MID Server. Select **SSH**. This field is available when **Define Connection Inline** is selected from the Connection list and **Auto-Select MID Server** is selected from the MID Selection list.\n\n</td></tr><tr><td>\n\nMID Server\n\n</td><td>\n\nData pill of the required MID Server. This field is available when **Define Connection Inline** is selected from the Connection list and **Specific MID Server** is selected from the MID Selection list.\n\n</td></tr><tr><td colspan=\"2\">\n\nSFTP Files To Copy\n\n</td></tr><tr><td>\n\nSource Path\n\n</td><td>\n\nPath of the directory that contains the files you want to copy. For example, `/root/doc/`.\n\n</td></tr><tr><td>\n\nInclude Files\n\n</td><td>\n\nList of target files to copy. This is a semicolon separated list that accepts wild cards, such as `*.txt`.**Note:** If no value is provided, subfolders in the specified directory are copied.\n\n</td></tr><tr><td>\n\nExclude Files\n\n</td><td>\n\nList of target files that should not be copied. This is a semicolon separated list that accepts wild cards, such as `*.txt`.\n\n</td></tr><tr><td>\n\nMaximum File Size \\(KB\\)\n\n</td><td>\n\nMaximum size of the file that can be copied.\n\n</td></tr><tr><td>\n\nMaximum Number of Files\n\n</td><td>\n\nMaximum number of files that can be copied in a request.\n\n</td></tr><tr><td colspan=\"2\">\n\nAttach Files To This Target Record\n\n</td></tr><tr><td>\n\nTarget Record\n\n</td><td>\n\nRecord in ServiceNow instance to which you want to attach the files.\n\n</td></tr><tr><td>\n\nTable\n\n</td><td>\n\nServiceNow table in which the target record is saved.\n\n</td></tr><tr><td colspan=\"2\">\n\nRetry Policy\n\n</td></tr><tr><td>\n\nEnable Retry Policy\n\n</td><td>\n\nOption to enable the retry policy. For more information, see [Retry policy](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/retry-policy.md).\n\n</td></tr><tr><td>\n\nOverride Default Policy for Alias\n\n</td><td>\n\nOption to override the default retry policy. This option is not applicable when **Define Connection Inline** is selected from the Connection list.\n\n</td></tr><tr><td>\n\nRetry Policy\n\n</td><td>\n\nDefault retry policy associated with **Connection Alias**. If **Override Default Policy for Alias** is selected, you can override the default retry policy and select another existing retry policy based on your requirement.\n\n</td></tr></tbody>\n</table>## Action error evaluation\n\n-   **If this step fails**\n\n    Data type: **Choice**\n\n    Option to continue running the next step or go to error evaluation. To use the step status code or message for a custom action error condition, see [Action error evaluation](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/action-error-evaluation.md).\n\n\n**Parent Topic:**[SFTP step](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/sftp-step.md)\n\n"}}