# --file-name

Source: https://zshot-cli.com/reference/flags/common/file-name/
Markdown: https://zshot-cli.com/reference/flags/common/file-name/index.md
Section: [Reference](https://zshot-cli.com/reference/) › [Flags](https://zshot-cli.com/reference/flags/) › [Common](https://zshot-cli.com/reference/flags/common/)
CLI: `--file-name`, `-f` · REST: CLI only
Value: `PATH`

Writes the output to this path and infers the [format](/reference/formats) from its extension. `-` writes to stdout. With several URLs, the files are numbered: `web.png` writes `web-1.png`, `web-2.png` and so on.

Without it, text goes to stdout: `markdown`, `txt`, `html`, `axtree`, `axtree_json`, `llm_text`, `llm_json`, and [`goal`](/reference/formats/goal), the default under [`--navigate`](/reference/flags/navigator/navigate). Every other output goes to `zshot-<timestamp>-<kind>.<extension>` in the working directory, such as `zshot-20261013T070820Z-image.png`, and its name is printed.

## Example

Write to a file:

**CLI**

```sh
zshot --file-name document.pdf https://zshot-cli.com/
```

Write a screenshot to `STDOUT`:
**CLI**

```sh
zshot -f - https://zshot-cli.com/ > shot.png
```


Write `web-1.png`, `web-2.png` and `web-3.png`:
**CLI**

```sh
zshot --file-name web.png \
  https://zshot-app.com/ \
  https://zshot-cli.com/ \
  https://scaleassembly.com/
```

## Related

Flags:

- [`--output-type`](https://zshot-cli.com/reference/flags/common/output-type/)

## Navigation

- [Examples](https://zshot-cli.com/examples/)
- [Download](https://zshot-cli.com/download/)
- [Purchase](https://zshot-cli.com/purchase/)
- [Reference](https://zshot-cli.com/reference/)
  - [Formats](https://zshot-cli.com/reference/formats/)
  - [Flags](https://zshot-cli.com/reference/flags/)
    - [Common](https://zshot-cli.com/reference/flags/common/)
      - [--completions](https://zshot-cli.com/reference/flags/common/completions/)
      - [--config](https://zshot-cli.com/reference/flags/common/config/)
      - [--diagnostics](https://zshot-cli.com/reference/flags/common/diagnostics/)
      - **--file-name**
      - [--formats](https://zshot-cli.com/reference/flags/common/formats/)
      - [--input-mimetype](https://zshot-cli.com/reference/flags/common/input-mimetype/)
      - [--license-info](https://zshot-cli.com/reference/flags/common/license-info/)
      - [--license-key](https://zshot-cli.com/reference/flags/common/license-key/)
      - [--log-chrome-to-stderr](https://zshot-cli.com/reference/flags/common/log-chrome-to-stderr/)
      - [--log-level](https://zshot-cli.com/reference/flags/common/log-level/)
      - [--no-fail](https://zshot-cli.com/reference/flags/common/no-fail/)
      - [--no-timeout](https://zshot-cli.com/reference/flags/common/no-timeout/)
      - [--open-source-licenses](https://zshot-cli.com/reference/flags/common/open-source-licenses/)
      - [--output-type](https://zshot-cli.com/reference/flags/common/output-type/)
      - [--quiet](https://zshot-cli.com/reference/flags/common/quiet/)
      - [--refresh-license](https://zshot-cli.com/reference/flags/common/refresh-license/)
      - [--software-rendering](https://zshot-cli.com/reference/flags/common/software-rendering/)
      - [--timeout](https://zshot-cli.com/reference/flags/common/timeout/)
      - [--trial](https://zshot-cli.com/reference/flags/common/trial/)
      - [--wait-for](https://zshot-cli.com/reference/flags/common/wait-for/)
    - [Agents](https://zshot-cli.com/reference/flags/agents/)
    - [Archive](https://zshot-cli.com/reference/flags/archive/)
    - [Browser](https://zshot-cli.com/reference/flags/browser/)
    - [Diagnostics](https://zshot-cli.com/reference/flags/diagnostics/)
    - [Document](https://zshot-cli.com/reference/flags/document/)
    - [Image](https://zshot-cli.com/reference/flags/image/)
    - [Navigator](https://zshot-cli.com/reference/flags/navigator/)
    - [Security](https://zshot-cli.com/reference/flags/security/)
    - [Server](https://zshot-cli.com/reference/flags/server/)
    - [Video](https://zshot-cli.com/reference/flags/video/)
  - [Agents](https://zshot-cli.com/reference/agents/)
  - [Configuration](https://zshot-cli.com/reference/configuration/)
  - [Crawling](https://zshot-cli.com/reference/crawling/)
  - [Docker](https://zshot-cli.com/reference/docker/)
  - [Exit Codes](https://zshot-cli.com/reference/exit_codes/)
  - [Linux](https://zshot-cli.com/reference/linux/)
  - [LLM Connections](https://zshot-cli.com/reference/llm_connections/)
  - [LLM Formatting](https://zshot-cli.com/reference/llm_formatting/)
  - [Local Inputs](https://zshot-cli.com/reference/inputs/)
  - [Navigator](https://zshot-cli.com/reference/navigator/)
  - [Security](https://zshot-cli.com/reference/security/)
  - [Server](https://zshot-cli.com/reference/server/)
  - [Shell completions](https://zshot-cli.com/reference/shell_completions/)
  - [Storage](https://zshot-cli.com/reference/storage/)
  - [Timeouts](https://zshot-cli.com/reference/timeouts/)
  - [Web Bot Auth](https://zshot-cli.com/reference/web_bot_auth/)
- [Support](https://zshot-cli.com/support/)
- [Changelog](https://zshot-cli.com/changelog/)

Site index: https://zshot-cli.com/llms.txt

