Help Centre › Building Processes
This article describes the RPA Code functionality to execute a BATCH file.
For a full list of available functions, please read CODE functions.
Description
The CODE Execute a BATCH file function allows you to execute a BATCH file.
Setting it up
To use the CODE Execute a BATCH file function, follow these instructions:
{{popups:rpas/add:action=file-execute-bat}}
Once on a process map:
- Navigate to the process where you would like to add the CODE Execute a BATCH file function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the CODE Execute a BATCH file option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| File | Yes | Text | - | The path to the batch file |
| Run as Administrator | No | Switch | Off | Execute with administrator privileges |
Output variables
This action does not produce output variables.
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