> 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).

# Check SFTP File Count

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://app.does.qa/screenshots/node/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](/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](/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](/test-step-options/failed-status.md)                 |
| **When should screenshots be taken?** | `Always` or `On Failures` (default)                                  |
| **Value Standardization**             | [Value Standardization](/test-step-options/value-standardization.md) |

## Related

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

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