Rename File or Directory activity
reference brazil Updated Sep 10, 2026 1 min read r_RenameFileOrDirectoryActivity.md
The Rename File or Directory activity renames a file or directory to a new name on an SFTP server.
Input variables
| Variable | Description |
|---|---|
| sourceHost | Name or IP address of the server containing the file or directory you want to rename. |
| sourcePort | Port number to use to communicate with the target server. The default port number is 22. |
| sourceFilePath | Full path to the file or directory to rename. |
| targetFilePath | Full path to the renamed file or directory. |
| sourceCredentialTag | Specific Credential aliases for Orchestration activities this activity must use to run SSH commands on the host. |
Output variables
| Variable | Description |
|---|---|
| errorMessages | The executionResult.errorMessages from the Activity designer parsing sources. If this variable is not null, the operation has failed. |
| result | A message saying that the operation has been successful. For example, you might see: Rename /tmp/sftp_test/subdir1 to /tmp/sftp_test/subdir2 complete. |
Conditions
| Condition | Description |
|---|---|
| Success | The activity succeeded in renaming the file or directory. |
| Failure | The activity failed to rename the file or directory. |
Parent Topic:SFTP File Transfer activity pack
45 lines · 2.2 KB
--- title: Rename File or Directory activity description: The Rename File or Directory activity renames a file or directory to a new name on an SFTP server. locale: en-US canonical_url: https://www.servicenow.com/docs/r/servicenow-platform/orchestration/r\_RenameFileOrDirectoryActivity.html release: brazil product: Orchestration classification: orchestration topic_type: reference last_updated: "2026-09-10" reading_time_minutes: 1 breadcrumb: [SFTP File Transfer activity pack, Orchestration activity packs, Classic Orchestration, ServiceNow AI Platform Additional Capabilities, Extend ServiceNow AI Platform capabilities] --- # Rename File or Directory activity The Rename File or Directory activity renames a file or directory to a new name on an SFTP server. ## Input variables |Variable|Description| |--------|-----------| |sourceHost|Name or IP address of the server containing the file or directory you want to rename.| |sourcePort|Port number to use to communicate with the target server. The default port number is **22**.| |sourceFilePath|Full path to the file or directory to rename.| |targetFilePath|Full path to the renamed file or directory.| |sourceCredentialTag|Specific Credential aliases for Orchestration activities this activity must use to run SSH commands on the host.| ## Output variables |Variable|Description| |--------|-----------| |errorMessages|The **executionResult.errorMessages** from the [Activity designer parsing sources](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/servicenow-platform/orchestration/t_CreateAParsingRule.md). If this variable is not null, the operation has failed.| |result|A message saying that the operation has been successful. For example, you might see: `Rename /tmp/sftp_test/subdir1 to /tmp/sftp_test/subdir2 complete`.| ## Conditions |Condition|Description| |---------|-----------| |Success|The activity succeeded in renaming the file or directory.| |Failure|The activity failed to rename the file or directory.| **Parent Topic:**[SFTP File Transfer activity pack](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/servicenow-platform/orchestration/c_OrchestrationSFTPActivityPack.md)
| title | Rename File or Directory activity |
| description | The Rename File or Directory activity renames a file or directory to a new name on an SFTP server. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/servicenow-platform/orchestration/r\_RenameFileOrDirectoryActivity.html |
| release | brazil |
| product | Orchestration |
| classification | orchestration |
| topic_type | reference |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | SFTP File Transfer activity packOrchestration activity packsClassic OrchestrationServiceNow AI Platform Additional CapabilitiesExtend ServiceNow AI Platform capabilities |