# File Lists

## Overview

A File List is assigned to a Project to define the files that should be included and excluded from a Project backup.

When you define a File List for a given Project type, you can exclude certain files from the compare. This is helpful when determining if a Project has changed, as it allows you to ignore binary file that may change every time.

## Creating a New File List

You can create new File Lists by clicking the *Add File List* button. This will launch you into the editing sequence.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FXcz4Mb1oe1o1ZBF9HOlL%2FWebApp_SiteSettings_FileLists_Add.png?alt=media&#x26;token=07402fcc-1613-40f1-b1ae-b14a98c48676" alt=""><figcaption></figcaption></figure>

Alternatively, you can click on any of the *Copy* icons next to an existing File List. This will create an editable instance of the chosen File List.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FpFDR3vxkwnGdVyx0yWuH%2FWebApp_SiteSettings_FileLists_Copy.png?alt=media&#x26;token=25f14b5d-917b-4e40-a650-8517f74c01a3" alt=""><figcaption></figcaption></figure>

Your new File List will appear in the *Custom File Lists* section.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2F1UOa72cwpEIb3mRMg0ip%2FWebApp_SiteSettings_FileLists_CopyCreated.png?alt=media&#x26;token=75d98c62-8b7a-4659-8f65-1aaeb5479640" alt=""><figcaption></figcaption></figure>

## Editing an Existing File List

Click on the name of a File List to edit its contents.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FwoaAQTrdQsAqsZdCbk4H%2FWebApp_SiteSettings_FileLists_ClickToEdit.png?alt=media&#x26;token=26cbc0a0-106f-4b4b-861b-896e23a5b57d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You cannot edit the default File Lists provided by Copia. You can only edit File Lists that appear in the *Custom File Lists* section.
{% endhint %}

This will launch you into the editing sequence. Label your new File List with the *Name* field and assign a project type with the *Project Type* dropdown.

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FBEvOERXm7nVUxv52BcCs%2FWebApp_SiteSettings_FileLists_Editing_01.png?alt=media&#x26;token=fa1472fe-5650-4caf-a976-540f16bc49ff" alt=""><figcaption></figcaption></figure>

Next, you will need to declare which files should be included in the backup and which should be excluded from the compare.&#x20;

The format for entering this information is based on the `.gitignore` format. While a more comprehensive summary of syntax options can be found through the [gitignore reference site](https://git-scm.com/docs/gitignore), a simplified table of common patterns is provided below:

| Pattern     | Description                                                           |
| ----------- | --------------------------------------------------------------------- |
| \*\*        | All files in current dir and subdir                                   |
| \*.\*       | All files in current dir and subdir                                   |
| /\**.\**    | All files in current dir                                              |
| \*.log      | All \*.log in current dir and subdir                                  |
| /\*.log     | All \*.log in current dir                                             |
| test.\*     | All files named test with any extension in the current dir and subdir |
| /test.\*    | All files named test with any extension in the current dir            |
| abc/\*.\*   | All files in the abc dir                                              |
| !abc/\*.log | Exclude log files in the abc dir                                      |

### Include in Backup

The Include in Backup section defines what is to be included (and excluded, by using the `!` symbol) in the backup.  Using the format above, you can add multiple lines to the filelist to define what you would like to be included in the backup.&#x20;

{% hint style="info" %}
A blank line will not affect the format of the File List. A line starting with a "#" symbol will be considered a comment and therefore not impact the File List. The lines process from top to bottom, so using a "!" symbol to exclude would typically occur after an include statement.
{% endhint %}

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2Fcdw7C9Ab8bnQvGVxbJxG%2FFilelist_new1.png?alt=media&#x26;token=3716a5f5-9bd6-498e-9729-00dbb23eb6d4" alt=""><figcaption></figcaption></figure>

### Exclude from Compare

After the backup operation has completed, Copia will determine if a change has been made by comparing the data from the device versus the existing data within Copia.  Using the *Exclude from Compare* list, you can choose to "ignore" certain files/folders during the comparison.  This lets you focus on changes that are important, versus changes that may be unimportant (like the current value of a timer, or a date/time).

{% hint style="info" %}
NOTE: The files listed in the *Exclude from Compare* are only used to determine if a modification has occurred, and will not affect the actual files that will be committed to Copia.
{% endhint %}

Once satisfied with the File List declarations, click the *Create File List* button.


---

# 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.copia.io/docs/devicelink/sitesandagents/sites/file-lists.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.
