The DOS Command action runs the text that is in a DOS command using the DOS Command executable and optionally saves the DOS window text to a variable or data field.
Note: The Actions Quick Reference provides a complete list of actions that you can print for easy reference.
-
On the Actions list, click Advanced and select DOS Command.
-
Enter the Command. You can enter any instructions that will work in the DOS window or a batch file (not just instructions for opening an application). Optionally, click the Magic Wand to use the Expression Builder.
-
Enter the amount of time (seconds) to wait for the process to complete in the Timeout text box. You can enter a positive number between 2 and 100,000 seconds. 30 is the default. When the action is run, the API will wait until the time you specified for the process to exit.
- (Optional) Select to Use working directory as the app base directory.
- (Optional) Select to Run As admin to run the command as an administrator.
- (Optional) If the executed code in the Command text box returns a response, select Save to and enter a location where it can be saved as a variable or data field. Click the Magic Wand to use the Expression Builder.
-
If needed, adjust the Run error task settings to fine tune how the action runs.
- Run error task: A botflow containing an error task automatically runs the error task in the event of an error. If the botflow does not contain an error task, the botflow stops in the event of an error.
- Stop on error: The botflow stops in the event of an error.
- Ignore errors: The action is skipped in the event of an error and the botflow attempts to execute the next action.
-
(Optional) Add a Note to document special instructions or functionality.
-
Toggle the run switch to Run and click OK to execute and save the action.
Note: The run switch is set to Run by default. To create or modify this action without executing it, click the slider to change the option to Don't Run. For more information, go to Action Builder.