List files
List the files in a folder that match a pattern, or the files the name rules choose.
Command in the File toolkit · id ooa.file/list · 9 inputs (1 required), 3 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Folder | File | Yes | Folder path, or name rules (a folder and rules on name, type, size and date) choosing the files. | |
| Pattern | String | No | * | Glob pattern, e.g. *.pdf. |
| Include subfolders | Boolean | No | false | Also list matching files in sub-folders. |
| Minimum size (bytes) | Number | No | Only files at least this large. | |
| Maximum size (bytes) | Number | No | Only files at most this large. | |
| Modified within (days) | Number | No | Only files changed in the last this many days. | |
| Older than (days) | Number | No | Only files last changed more than this many days ago. | |
| Sort by | String | No | name | Order of the list: by path name, by last change (oldest first) or by size (smallest first). |
| Descending | Boolean | No | false | Reverse the order, e.g. newest first with sort_by modified. |
Outputs
| Output | Type | What it is |
|---|---|---|
| files | List | File paths in the chosen order. |
| count | Number | Number of files found. |
| first | File | First file of the list (e.g. the newest with sort_by modified, descending); empty when none. |