%n.Įnvironment variables can be accessed in the script using %variable_name%. These arguments can then be accessed in the script using %1, %2. Parameters are passed in via positional command line arguments in the order the parameters are specified.
Parameters and Batch filesīatch scripts support the use of parameters (arguments) and environment variables.
Your script will then be available to be used either directly or from an OtterScript using the BATCall operation. Just click the 'Add Script' button on the Scripts page and select 'Upload'. The easiest way to execute a batch script in Otter is to start by uploading an existing script. The only prerequisite is to have v1.14.0+ of the Scripting extension installed in Otter v3.0.20+. Prerequisitesīatch scripts only work against Windows Servers and require a Windows Server to be added in Otter. bat files and has added augmented help 'comment headers' to display a UI around them. You have the option to convert your batch scripts to PowerShell, but that may not always be straightforward or worthwhile.Īs of v3.0.20, Otter supports executing. Because batch scripts have been around for so long, there are many old scripts that are still in use. Batch is an old technology that has been superseded by PowerShell, but still tends to be easier to work with. Windows batch scripts can simplify routine or repetitive tasks using the Windows command line.