# List Existing Files with CLI

Print a list of files that exist in the <ProductShortName /> workspace you specify. The list includes the file name and ID, URL, size, creation timestamp, and metadata.

***

## Prerequisites

<SdkInstallationSteps />

## List Files

1. Pass your API key and the name of the <ProductShortName /> workspace whose files you want to list. (You can also skip this step and just pass your API key and workspace in the `list-files` command.)
  ```shell
  # This command prompts you to pass the deepset API key and workspace name
  deepset-cloud login
  ```
2. Run the following command to get a list of the files in the workspace you specified: 
  ```shell
  deepset-cloud list-files
  ```

A table with file details is displayed in the console. 

## Examples

This command lists all files whose names contain the string `hilton_hotel` that exist in the "hotels" workspace. The list is broken up into batches of 20 files. It also includes the API key to connect to <ProductShortName />:

  ```shell
  deepset-cloud list-files --api-key <API_KEY> --workspace-name hotels --name "hilton-hotel" --batch-size 20
  ```
