Help Centre › Building Processes
Execute a batch script file and capture its output.
Add it to a process
In the process designer, open the Add step tab. Find Run batch file under Process, or type its name in the search box, and drag it onto the canvas.
Fields
| Field | Required | What it does |
|---|---|---|
| File path | Yes | Enter the file path, or use a variable such as {folders::desktop::path}\file.txt. |
| Output variable | No | Name of the variable where the result will be stored |
| Exit-code variable | No | Variable to store the exit code, for branching on success |
| Full-result variable | No | Variable to store the full result object (stdout, stderr, exit code, duration) |
| Timeout (seconds) | No | Seconds to wait before the script is stopped (default 60, 0 for no limit) |
| Working directory | No | Working directory to run the script in |
| Environment variables | No | Extra environment variables for the script |
| Window style | No | Console window style (Windows only) Choices: Normal, Hidden, Minimized, Maximized. |
| Fail on non-zero exit | No | Fail the step when the script exits non-zero (default true) |
| Run as Administrator | No | Execute the batch file with elevated administrator privileges. Default: off. |
What it gives back
{variable}– The script's output{exit_code_variable}– The script's exit code{result_variable}– {command, stdout, stderr, exit code, pid, timed out, duration, succeeded}
See all Process steps.
Errors
| Error | Description |
|---|---|
| File not found | The batch file does not exist |
| Permission denied | Insufficient permissions to run the file |
Tips
- Executes a .bat or .cmd file
- Enable Run as Administrator for system-level commands