# Override Files

Suppose a file already exists in a SharePoint folder and the user attempts to migrate the same file using the Attach2Dynamics UI, real-time or through bulk migration. In that case, the outcome will depend on the **"Override file"** configuration. If this setting is checked, the existing file will be overwritten. If unchecked, a new file version will be added with a version number.

## Configuration

### Unchecked

By default, the "**Override file**" setting is unchecked, as indicated in the screenshot.

<figure><img src="/files/hUZIbpZFglvVeDOFf1cn" alt=""><figcaption></figcaption></figure>

In this scenario, if a file already exists in a SharePoint folder and a user attempts to migrate a file with the same name (or the same file, or two files with the same name simultaneously) using either real-time or the Attach2Dynamics UI:

* **Real-time**

<figure><img src="/files/5GHFkuc1fdudFyLtHqZw" alt=""><figcaption></figcaption></figure>

* **Attach2Dynamics UI**

<figure><img src="/files/XYORQhAsAxaVK8gNPl5v" alt=""><figcaption></figcaption></figure>

On SharePoint, a new file with a version number gets appended.

<figure><img src="/files/srx9w8wgZ5isLoSrDwSr" alt=""><figcaption></figcaption></figure>

### Checked

<figure><img src="/files/3116hkZd6rx6mMMO3WXd" alt=""><figcaption></figcaption></figure>

If the user enables the "Override files" setting for migration when encountering files with the same name in a SharePoint folder, the following occurs:

* **Real-time**

<figure><img src="/files/QncHmBewpiMYbgZKcsIt" alt=""><figcaption></figcaption></figure>

* **Attach2Dynamics UI**

<figure><img src="/files/ViqoebONLq3pYVmSi0IJ" alt=""><figcaption></figcaption></figure>

This setting ensures that the latest version of the file is always migrated and replaces any existing file with the same name in SharePoint.

<figure><img src="/files/woLP0E6CTsZGEM6Trj74" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** This is across both the Attach2Dynamics UI, bulk migrations, and real-time migrations.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.inogic.com/sharepoint-security-sync/features/override-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
