> For the complete documentation index, see [llms.txt](https://help.novacuraflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.novacuraflow.com/6.11/development/flow-studio/connectors/business-systems/microsoft-sharepoint-2013/generic-operations/document-library/file-management.md).

# File management

### Copy file

Copies a file from a Document Library to another (or the same) Document Library at the same SharePoint site.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter                         | Description                                                                                                                                         |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Source Document Library Name      | Name of source Document Library in SharePoint to copy file from                                                                                     |
| Source filename                   | Remote filename in Document Library, including any extensions or folders if applicable. E.g. "file.txt" or "subfolder1/subfolder2/file.txt" to move |
| Destination Document Library Name | Name of target Document Library in SharePoint to copy file to                                                                                       |
| Destination filename              | Name of file in destination Document Library                                                                                                        |
| Overwrite                         | Specifies whether to overwrite destination file if it already exists                                                                                |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not.

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description                                  |
| ---------- | -------------------------------------------- |
| 1000       | Unspecified error.                           |
| 1000001    | User is not authorized to perform operation. |

### Delete file <a href="#delete-file" id="delete-file"></a>

Deletes a file in the Document Library. If the file does not exist, the operation is considered succesful.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter             | Description                                                                                                                                         |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Document Library Name | Name of Document Library in SharePoint (not id)                                                                                                     |
| Filename              | Remote filename in Document Library, including any extensions or folders if applicable. E.g. "file.txt" or "subfolder1/subfolder2/file.txt" to move |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not.

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description                                  |
| ---------- | -------------------------------------------- |
| 1000       | Unspecified error.                           |
| 1000001    | User is not authorized to perform operation. |

### Get file information <a href="#get-file-information" id="get-file-information"></a>

Gets information about a file provided as a releative url, example: '/subsite1/Shared Documents/file.doc'

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter             | Description                                                                                                                                 |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Document Library Name | Name of Document Library in SharePoint (not id)                                                                                             |
| Filename              | Remote filename in Document Library, including any extensions or folders if applicable. E.g. "file.txt" or "subfolder1/subfolder2/file.txt" |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not. If succesful, result of operation is stored in Results member

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |
| Results      | Record variable containing the results of operation                    |

**Structure of Results Results**

&#x20;Author

* &#x20;Id
* &#x20;LoginName
* &#x20;Email
* &#x20;Title
* &#x20;IsSiteAdmin

&#x20;CheckedOutByUser

* &#x20;Id
* &#x20;LoginName
* &#x20;Email
* &#x20;Title
* &#x20;IsSiteAdmin

&#x20;LockedByUser

* &#x20;Id
* &#x20;LoginName
* &#x20;Email
* &#x20;Title
* &#x20;IsSiteAdmin

&#x20;ModifiedBy

* &#x20;Id
* &#x20;LoginName
* &#x20;Email
* &#x20;Title
* &#x20;IsSiteAdmin

&#x20;CheckInComment

&#x20;CheckOutType

&#x20;ContentTag

&#x20;CustomizedPageStatus

&#x20;ETag

&#x20;Exists

&#x20;Length

&#x20;Level

&#x20;MajorVersion

&#x20;MinorVersion

&#x20;Name

&#x20;ServerRelativeUrl

&#x20;TimeCreated

&#x20;TimeLastModified

&#x20;Title

&#x20;UIVersion

&#x20;UIVersionLabel

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description        |
| ---------- | ------------------ |
| 1000       | Unspecified error. |

### List files <a href="#list-files" id="list-files"></a>

Lists all files at the root of a Document Library

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter             | Description                                                                          |
| --------------------- | ------------------------------------------------------------------------------------ |
| Document Library Name | Name of Document Library in SharePoint (not id)                                      |
| Populate user members | Specifies whether to populate members that relates to SharePoint users, e.g. Author. |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not. If succesful, result of operation is stored in Results member

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |
| Results      | Table variable containing the results of operation                     |

Structure of Results Results

&#x20;Author

* &#x20;Id
* &#x20;LoginName
* &#x20;Email
* &#x20;Title
* &#x20;IsSiteAdmin

&#x20;CheckedOutByUser

* &#x20;Id
* &#x20;LoginName
* &#x20;Email
* &#x20;Title
* &#x20;IsSiteAdmin

&#x20;LockedByUser

* &#x20;Id
* &#x20;LoginName
* &#x20;Email
* &#x20;Title
* &#x20;IsSiteAdmin

&#x20;ModifiedBy

* &#x20;Id
* &#x20;LoginName
* &#x20;Email
* &#x20;Title
* &#x20;IsSiteAdmin

&#x20;CheckInComment

&#x20;CheckOutType

&#x20;ContentTag

&#x20;CustomizedPageStatus

&#x20;ETag

&#x20;Exists

&#x20;Length

&#x20;Level

&#x20;MajorVersion

&#x20;MinorVersion

&#x20;Name

&#x20;ServerRelativeUrl

&#x20;TimeCreated

&#x20;TimeLastModified

&#x20;Title

&#x20;UIVersion

&#x20;UIVersionLabel

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description        |
| ---------- | ------------------ |
| 1000       | Unspecified error. |

### Move file <a href="#move-file" id="move-file"></a>

Moves a file from a Document Library to another (or the same) Document Library at the same SharePoint site.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter                         | Description                                                                                                                                         |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Source Document Library Name      | Name of source Document Library in SharePoint to move file from                                                                                     |
| Source filename                   | Remote filename in Document Library, including any extensions or folders if applicable. E.g. "file.txt" or "subfolder1/subfolder2/file.txt" to move |
| Destination Document Library Name | Name of target Document Library in SharePoint to move file to                                                                                       |
| Destination filename              | Name of file in destination Document Library                                                                                                        |
| Move operations                   | Specifies move options.                                                                                                                             |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not.

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description                                  |
| ---------- | -------------------------------------------- |
| 1000       | Unspecified error.                           |
| 1000001    | User is not authorized to perform operation. |

### Update file property <a href="#update-file-property" id="update-file-property"></a>

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter           | Description                                                        |
| ------------------- | ------------------------------------------------------------------ |
| Server relative url | An url relative to server, e.g. "/subsite/doclib/folder/file.txt". |
| Field name          | Name of field or column                                            |
| New value           | The new value to set on field                                      |

#### Output <a href="#output" id="output"></a>

Record with information about whether operation failed or not.

| Member       | Description                                                            |
| ------------ | ---------------------------------------------------------------------- |
| HasFailed    | Whether operation has failed or not                                    |
| ErrorMessage | A description of the failure, if any                                   |
| ErrorCode    | An error code related to operation failure. Is 0 if no failure occured |

#### Errors <a href="#errors" id="errors"></a>

| Error code | Description        |
| ---------- | ------------------ |
| 1000       | Unspecified error. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.novacuraflow.com/6.11/development/flow-studio/connectors/business-systems/microsoft-sharepoint-2013/generic-operations/document-library/file-management.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
