Find a bounded set of approved files by a file-name pattern.
Behavior
Connect a folder from Show Folder Picker and enter a file name such as invoice-??.pdf. The pattern matches the whole file name, ignoring case. Use for any number of characters and ? for one character. For example, .pdf finds both April.pdf and May.PDF.
Maximum depth 0 searches the selected folder. Depth 1 includes its immediate subfolders. Maximum results counts matching files. The block visits names in sorted order within each folder and searches each subfolder as it reaches it.
The Files output contains a list of file IDs valid in this run. Connect it to Get Item to open one result, or pass the list to a block that accepts several files. An empty search succeeds with an empty list and count 0. To order documents by a date printed inside them, extract that date before sorting. The search order reflects names and folders.
Inputs
folder- Folder: text (filesystem.folder); required.pattern— File-name pattern:text; required.maxDepth— Maximum depth:number; optional; whole numbers only.maxResults— Maximum results:number; optional; whole numbers only.
Outputs
files- Files: list; required.count- Count: number; required.
fire- becomes true only after the operation completes validly.
Exact settings reference
These are the saved settings and defaults. If a value is connected to the matching input, that connected value is used.
| ID | Setting | Control | Default | Bounds/options |
|---|---|---|---|---|
pattern | File-name pattern | text | Empty text | — |
maxDepth | Maximum depth | number | 16 | — |
maxResults | Maximum results | number | 500 | — |
What happens when it runs
This block runs directly in the Files & Documents add-on. Connect file, folder, binary, and credential outputs from earlier successful blocks in the same workflow run; the add-on uses those connected resources without exposing local paths.
Connected inputs take precedence over saved settings, including false and empty values. A present malformed connector never falls back to a saved value and stops the workflow with a clear message.
- The connected resource expired, belongs to another run, or no longer exists. Reconnect the matching output or recreate the item earlier in this run.
- File and folder operation errors explain whether the connected item is missing, unavailable, too large, not empty, or already exists and state the setting or connection to change.
- If an unexpected local problem occurs after valid inputs, retry after closing applications that may hold the file; if it repeats with the same valid inputs, reinstall or update this official add-on.
Every failure stops the workflow at this block. No partial resource output or success Fire is emitted.
