RenameAttachmentOrDocument
Renames an attachment or document in a SharePoint library. Useful for updating file names without affecting content.
Execute
The path specified in SourceFileURL must be relative to what you have used in URL. Refer to the query example below:
/* URL = https://mysite.sharepoint.com/sites/Subsite */ EXEC RenameAttachmentOrDocument SourceFileURL = '/Shared Documents/Source Folder/Subfolder/Original Document.txt', NewFileName = 'Renamed Document.txt';
Input
| Name | Type | Required | Description |
| SourceFileURL | String | True | The relative path of the file or attachment to be renamed. This path is relative to the base URL specified in the SharePoint connection properties. |
| NewFileName | String | True | The new name for the file, including the file extension (such as 'UpdatedDocument.pdf'). |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | Indicates whether the rename operation was successful. Returns 'true' for success and 'false' for failure. |