MS-DOS Batch commands

An Opus button or hotkey function can be set to MS-DOS Batch Function mode. A function in this mode is run as if it were a .bat batch file, and it can use MS-DOS commands, branching and logic instructions, as well as run external programs that are only designed to be run from the command line.

    dos batch function.png 

The above screenshot shows an example of a simple MS-DOS batch function. This uses the MS-DOS dir instruction to produce a directory listing of the current source folder. Using the > redirection symbol, the directory listing will be saved to a file in the destination path named after the current source folder.

 

Breaking down the function,

 

When you run an MS-DOS batch function, Opus actually creates a temporary batch file on disk, and writes your instructions to it before invoking it. If you were to look at the batch file created by the above function, you would see something similar to the following:

 

@echo off
chcp 1252 > nul
C:
cd "\Users\Jon\Documents"
dir /w > "C:\Test\Documents.txt"


These instructions are written automatically to the .bat file, based on the parameters and definition of the function.

 

Several of the command modifiers relate specifically to MS-DOS batch functions:

 

See the command modifier reference for a full description of command modifiers.