Delete
Delete a file if it exists, every file the name rules choose, or every file in a folder that matches a pattern and optional size and age limits.
Command in the File toolkit · id ooa.file/delete · 9 inputs (1 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Path | File | Yes | File path (or name rules choosing several files), or a folder when pattern is given. | |
| Pattern | String | No | Delete the files in the folder at path that match this glob pattern. | |
| Include subfolders | Boolean | No | false | With pattern, also delete matching files in sub-folders. |
| Older than (days) | Number | No | With pattern, only files last changed more than this many days ago. | |
| Minimum size (bytes) | Number | No | With pattern, only files at least this large. | |
| Maximum size (bytes) | Number | No | With pattern, only files at most this large. | |
| Modified after | DateTime | No | With pattern, only files last changed after this date and time (UTC, like every DateTime; Text to date converts local times). | |
| Modified before | DateTime | No | With pattern, only files last changed before this date and time (UTC, like every DateTime; Text to date converts local times). | |
| Several files at once | Boolean | No | false | Delete up to four files at the same time; faster for many files on a network share. |
Outputs
| Output | Type | What it is |
|---|---|---|
| deleted | Number | Number of files deleted. |
| files | List | Paths of the files deleted. |