MoveFile
Transfers a file from one location to another within local or supported cloud storage. This procedure is useful for reorganizing file structures or moving processed files to archival or staging areas.
Procedure-Specific Information
The procedure accepts the parameters
- SourcePath: path of the file you request to move
- DestinationPath: path of the folder where you request to move the file
- Usage of absolute path : sftp://localhost:22/folder1/file1.csv will move the file from the source path /folder1/file1.csv .
- Usage of relative path: file1.csv will move the file from the source path {CONNECTION STRING URI}/file1.csv If connection string has the URI set to: sftp://localhost:22/folder2, it will move the file from the source path /folder2/file1.csv.
EXEC MOVEFILE @SourcePath = 'sftp://localhost:22/folder1/file1.csv' @DestinationPath = 'sftp://localhost:22/folder2/' //absolute path
EXEC MOVEFILE @SourcePath = 'file1.csv' @DestinationPath = 'folder2' //relative path
Input
| Name | Type | Description |
| SourcePath | String | Specifies the full file path of the source file that is moved from a local or cloud-based storage system. |
| DestinationPath | String | Specifies the full file path of the destination location where the file is placed after the move operation. |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | Indicates whether the file move operation completed successfully. The Success output returns a value of 'true' when the file is moved without error and a value of 'false' when a failure occurs during the process. |