CopyDocument
Copies a document from the SharePoint library.
Note: This procedure makes use of indexed parameters. These input parameters are denoted with a '#' character at the end of their names.
Indexed parameters facilitate providing multiple instances a single parameter as inputs for the procedure.
Suppose there is an input parameter named Param#. Input multiple instances of an indexed parameter like this:
EXEC ProcedureName Param#1 = "value1", Param#2 = "value2", Param#3 = "value3"
Input
| Name | Type | Description |
| DocumentName | String | The name of the document in the document library to be copied. |
| DocumentLibrary | String | The name of the document library the document is currently stored on. |
| NewDocumentLibrary | String | The name of the document library the document is being copied to. |
| NewDocumentName | String | The new name of the document once it has been copied. If left blank, this will be the same as the DocumentName. |
| MetadataName# | String | The name of a metadata field to be set for the document. |
| ReturnID | String | The return ID of the document. |
Result Set Columns
| Name | Type | Description |
| Result | String | Boolean value indicating whether the operation was successful. |
| _dlc_DocId | String | The document ID. |
| _dlc_DocIdUrl | String | The URL of the document ID. |
| Vti_author | String | The creator of the document. |
| Vti_etag | String | The e-tag of the document. |
| ID | String | The ID of the document. |
| FileRef | String | The file reference of the document. |