> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcellm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# File Search

Uses glob patterns to search for files on your disk and returns matching file paths.

## Parameters

<ParamField body="rootPath" type="string" required>
  The root directory to start the glob search from. Example: `C:\Users\username\Documents`
</ParamField>

<ParamField body="includePatterns" type="string[]" required>
  Patterns to match files you want to find. Use absolute paths with wildcards. Common examples:

  * `C:\Users\username\Documents\*.pdf` - All PDF files in Documents
  * `C:\Users\username\Downloads\*.xlsx` - All Excel files in Downloads
  * `C:\Projects\**\report*.docx` - Word files starting with "report" in Projects and all subfolders
  * `C:\Data\2024-*.csv` - CSV files starting with "2024-" in Data folder
</ParamField>

<ParamField body="excludePatterns" type="string[]">
  Patterns to exclude files from results. Use absolute paths with wildcards. Common examples:

  * `C:\Users\username\Documents\*temp*` - Exclude files with "temp" in the name
  * `C:\Users\username\Documents\*.bak` - Exclude backup files
  * `C:\Projects\**\.git\**` - Exclude files in .git folders
  * `C:\Users\username\Documents\*draft*` - Exclude files with "draft" in the name
</ParamField>

## Returns

<ResponseField name="filePaths" type="string[]">
  A list of file paths that match the include patterns and don't match the exclude patterns.
</ResponseField>

<Info>
  This tool is automatically used by the AI model when needed. You enable it in Cellm's ribbon menu, then simply ask the model to perform tasks that require file operations (e.g., "Find all PDF files in my Documents folder").
</Info>

<RequestExample>
  ```excel Find PDF files theme={null}
  =PROMPT("Find all PDF files in C:\Users\username\Documents")
  ```

  ```excel Find CSV files excluding temporary theme={null}
  =PROMPT("Find all CSV files in C:\Users\username\Downloads, but exclude any files with 'temp' or 'draft' in the name")
  ```
</RequestExample>

<ResponseExample>
  ```excel With cell reference theme={null}
  =PROMPT("Find all PDF files in this folder", A1)
  ```

  Where A1 contains: `C:\Users\username\Documents`
</ResponseExample>
