> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/check/check-sftp-file-count.md). Agents can also search and read this documentation through its [MCP server](https://docs.does.qa/~gitbook/mcp).

# Check SFTP File Count

Compare how many files are in an SFTP directory.

Check SFTP File Count connects to an SFTP server and compares how many files are in a directory against what you expect. Use it when the exact file name varies but the total should not.

![Check SFTP file count Test Step](https://static.does.qa/assets/nodes/check_sftp_fileCount.png)

## When to use it

* Confirm a batch job wrote the expected number of export files.
* Verify a directory is empty after cleanup.
* Use `greaterThanOrEqual` when you only need to prove at least one file arrived.

## Configure

### Basics

| Field               | What to set                                                                                                    |
| ------------------- | -------------------------------------------------------------------------------------------------------------- |
| **URL**             | SFTP server address (supports [Values](https://docs.does.qa/values/value-store.md))                            |
| **Port**            | `22` (default)                                                                                                 |
| **User**            | SFTP username (supports Values)                                                                                |
| **Password**        | SFTP password (supports Values)                                                                                |
| **Path**            | Directory path on the server                                                                                   |
| **Comparison Type** | [Comparison Type](https://docs.does.qa/test-step-options/comparison-type.md) (`greaterThanOrEqual` by default) |
| **Value**           | Expected count as text and/or a Value                                                                          |

### Advanced

| Field                                 | What to set                                                                              |
| ------------------------------------- | ---------------------------------------------------------------------------------------- |
| **Status on fail**                    | [Failed Status](https://docs.does.qa/test-step-options/failed-status.md)                 |
| **When should screenshots be taken?** | `Always` or `On Failures` (default)                                                      |
| **Value Standardization**             | [Value Standardization](https://docs.does.qa/test-step-options/value-standardization.md) |

## Related

* [Check SFTP File Exists](https://docs.does.qa/test-steps/check/check-sftp-file-exists.md)
* [Check SFTP File Does Not Exist](https://docs.does.qa/test-steps/check/check-sftp-file-does-not-exist.md)
* [Check](https://docs.does.qa/test-steps/check.md)

**Tags:** `check`, `sftp`, `fileCount`
