# Selecting cloud storage files

{% hint style="info" %}
**Required dataset permission:** Edit dataset settings
{% endhint %}

For a cloud storage dataset, you manage files from the file selection panel.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FeK4QKflFm9Ijge9Xk2zR%2FDatasetFileSelection.png?alt=media&#x26;token=8dafabf8-962f-40cf-a351-efdef8efe4fe" alt=""><figcaption><p>File selection panel for a cloud storage dataset</p></figcaption></figure>

When you create a dataset, after you provide the cloud storage credentials and save the dataset, Textual immediately prompts you to select dataset files. After you select the files and click **Next**, Textual prompts you to set the output location.

For an existing dataset, to display the **File Selection** panel

1. On the dataset details page, click **Project files**.
2. On the dataset files page, click **Select Files**.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FSnw8gYkPIjofvX5g62Sm%2FDatasetS3Files.png?alt=media&#x26;token=4f2ec9c7-17b8-4798-9fc2-bb67acc1c01c" alt=""><figcaption><p>File list with option to select files</p></figcaption></figure>

The file selection includes:

* Whether to restrict the dataset to specific file types
* The files or folders to include in the dataset

When you change the file selection, Textual scans the files for entities. For more information, go to [tracking-and-managing-file-processing](https://docs.tonic.ai/textual/dataset-files/tracking-and-managing-file-processing "mention").

## Filtering files by file extension <a href="#cloud-file-type-filter" id="cloud-file-type-filter"></a>

When you select files, you can filter the selectable files based on file extension.

To limit the file extensions to include:

1. Click **File Extension Filter**.\
   \
   By default, all file extensions are included, and none of the checkboxes are checked.
2. Check the checkbox for each file extension to include.\
   \
   As you select the file extensions to include, Textual updates the navigation pane so that you can only select files that have one of those file extensions. It hides files that have other file extensions and folders that do not contain files with the selected file extensions.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FFU4heocE8bmRaMrUvqXE%2FDatasetFileExtensionFilter.png?alt=media&#x26;token=6d404047-5cf4-4cbf-b7eb-6047f4b5bc3f" alt=""><figcaption><p>File extension filter on the file selection panel</p></figcaption></figure>

## Selecting files and folders to include <a href="#cloud-file-folder-select" id="cloud-file-folder-select"></a>

In the file selection area, you navigate to and select the folders and files to add to the dataset.

### Navigating through the folders

In the navigation area, to display the contents of a folder, click the **Open** link for the folder.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FsDlnkh54kg56tS1VRWrS%2FDatasetFileSelectionFolderOpenLinks.png?alt=media&#x26;token=30c96243-c623-448d-80ef-3cc81f5646c3" alt=""><figcaption></figcaption></figure>

### Selecting a file or folder

To add a folder or file to the dataset, check its checkbox.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FWDYGUfSNhI5REUOMNEKj%2FDatasetFileSelectionFilesSelected.png?alt=media&#x26;token=d7a11f5c-7c1e-444d-8723-560d23bb80f2" alt=""><figcaption><p>File selection panel with selected files</p></figcaption></figure>

### Managing selected folders

In the navigation pane, when you check a folder checkbox, Textual adds it to the **Prefix Patterns** list.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2F5QY88srNNMeVPY1bLEZo%2FDatasetFileSelectionPrefixPatterns.png?alt=media&#x26;token=a80efe80-4bdf-435b-96df-527ac7105c70" alt=""><figcaption><p>Selected paths for a cloud storage dataset</p></figcaption></figure>

#### Adding a folder manually

Instead of navigating to a folder and selecting it, you can add the path to the list manually

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FgUBd7Qcc5jhhqxhHaHtc%2FDatasetFileSelectionAddPrefixPattern.png?alt=media&#x26;token=07b81cc1-2a11-406e-92c6-c7081befab3d" alt=""><figcaption></figcaption></figure>

To add a folder path:

1. Click **Add Prefix Pattern**.
2. In the field, type the path to the folder, then click the save icon.

#### Removing folder paths

To remove a folder path from the dataset, either:

* In the navigation pane, uncheck its checkbox.
* In the **Prefix Patterns** list, click its delete icon.

For the selected folders, the dataset includes all of the applicable files in the folder that:

* Are of a file type that Textual supports
* Match the file extension filter

### Managing selected files

In the navigation pane, when you select an individual file, Textual adds it to the **Selected Files** list.

<figure><img src="https://3072847115-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvOPn7KQptPWmS5iKg5P0%2Fuploads%2FQwpsoQIFQMfJGr0dvDlb%2FDatasetFileSelectionSelectedFiles.png?alt=media&#x26;token=df5072af-3394-479c-adb7-f24700a025e4" alt=""><figcaption><p>Selected files for a cloud storage dataset</p></figcaption></figure>

To delete a file, either:

* In the navigation pane, uncheck its checkbox.
* In the **Selected Files** list, click its delete icon.
