DeleteDocument
Deletes a document from a SharePoint document library. Useful for content lifecycle management and ensuring obsolete documents are removed.
Stored Procedure-Specific Information
The DeleteDocument stored procedure deletes a document from a SharePoint document library. The Library parameter specifies the document library name, and the Path parameter specifies the relative path to the document within that library.To execute this procedure, enter:
EXEC DeleteDocument Library = 'Documents', Path = 'Test Folder 1/Test Document 3.txt';
Input
| Name | Type | Required | Description |
| Library | String | True | The name of the document library on the SharePoint server where the file or folder is stored. Example: 'Shared Documents'. |
| Path | String | True | The relative path of the file or folder to be deleted within the specified document library. Example: 'ProjectFiles/Report.pdf' or 'ProjectFiles/OldFolder/'. |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | Indicates whether the deletion operation was successful. Returns 'true' if the document or folder was deleted successfully, otherwise 'false'. |