Wait for file
Wait until a file appears and has stopped growing (for example a download or an export), then return its path.
Command in the File toolkit · id ooa.file/wait_for_file · 5 inputs (1 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Path | File | Yes | File to wait for; the name may use * and ? (e.g. Downloads/report*.xlsx), the newest match wins. | |
| Timeout (seconds) | Number | No | 60 | How long to wait at most. |
| Stable (seconds) | Number | No | 1 | The file's size must stay the same for this long, so a file still being written is not taken. |
| Ignore temporary | Boolean | No | true | Skip browser download placeholders (.crdownload, .part, .tmp) and Office lock files (~$...). |
| Fail on timeout | Boolean | No | true | Fail with FILE.WAIT_TIMEOUT when time runs out; otherwise found is false. |
Outputs
| Output | Type | What it is |
|---|---|---|
| path | File | Path of the file found; empty when time ran out and fail_on_timeout is off. |
| found | Boolean | True when the file was found in time. |