Definition and Usage
Retrieve files in a folder. This command allows you to get a list of files from a specified directory based on filtering criteria and sorting preferences. You can include or exclude subfolders and hidden files according to your requirements.
Parameter Values
Input parameters
Parameter | Description | Possible Values | Required | Options / Notes |
Folder | Enter or select a folder | - | Yes | Use the folder selector button to browse for folders |
Filters | Set up filters(allowing wildcard use like "Pic*" or "Pic?"). For multiple filters, separate the rules with "|", for example, rule 1|rule 2 | - | No | Default is "*.*" which retrieves all files |
Include subfolders | Whether to find files under subfolders | - | No | When checked, files in all subfolders will be included |
Ignore hidden files | Specify whether to ignore the hidden files | - | No | When checked, hidden files will be excluded from results |
Specify file sorting rule | Specify whether and how to sort the file | - | No | When checked, additional sorting options appear |
Sort by | Specify whether to sort the results and by which criterion | File name, File size, Time of creation, Last edited | No | Only available when sorting is enabled |
Order | Specify whether to sort the items in descending or ascending order | Ascending, Descending | No | Only available when sorting is enabled |
Store file list into | Store the file list in a new variable | - | Yes | Output variable that will contain the list of files |
Error handling
Parameter Name | Description |
Throw error & stop | When an error occurs, the action will trigger an error and stop the execution of the entire app. |
Retry command | If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process. |
Ignore error & continue | When an error occurs, the action will be ignored, and the workflow will continue without interruption. |
Variables produced
The action produces a variable containing the list of file paths found in the specified folder. This output is an array of strings, with each string representing the full path to a file.
Using Variables in Conditions
You can use the {x} button or variable icon to insert previously defined variables into parameter fields. For example, you could use a variable for the folder path if it's dynamically determined during runtime. The output variable containing the file list can be used in subsequent actions such as loops to process each file individually.
Notes
Ensure the specified folder exists and is accessible; otherwise, the action will fail.
The wildcard filter supports "*" (matches any sequence of characters) and "?" (matches any single character).
When using multiple filters separated by "|", files matching any of the filters will be included.
The sorting functionality is particularly useful when processing files in a specific order, such as by creation date or file size.
The output variable is an array that can be iterated through using loop actions.