Otter Documentation

General - Execute Process

  • Last Modified: 2020-06-26

This is generated from the built-in components of Otter 2.2, and may be different than what you have installed (especially if you have extensions); go to [User Icon] > Documentation within your Otter instance to see exactly what operations are available.

Execute Process

Executes a process, logs its output, and waits until it exits.

Operation type:

Executing - this operation will perform a specified action or actions on a remote server.

Script usage:

InedoCore::Exec(
	[FileName: <text>],
	[Arguments: <text>],
	[WorkingDirectory: <text>],
	[OutputLogLevel: <integer>],
	[ErrorOutputLogLevel: <integer>],
	[SuccessExitCode: <text>],
	[ImportVariables: <true/false>],
	[WarnRegex: <text>],
	[LogArguments: <true/false>],
	[ReportProgressRegex: <text>],
	[OutputFilterRegex: <text>]
);

Arguments:

Name Format Script Usage Usage Notes
File name
text
FileName
Arguments
text
Arguments
Working directory
text
WorkingDirectory
Output log level
integer
OutputLogLevel
Error log level
integer
ErrorOutputLogLevel
Success exit code
text
SuccessExitCode
Integer exit code which indicates no error. The default is 0. This can also be an integer prefixed with an inequality operator.
Import variables
true/false
ImportVariables
When set to true, all scalar execution variables currently accessible will be exported as environment variables to the process.
Warning regex
text
WarnRegex
When set to a valid regular expression string, output messages which are matched will be logged as warnings. To log only part of the message, use a group with name "m".
Log arguments
true/false
LogArguments
Report progress regex
text
ReportProgressRegex
When set to a valid regular expression string, attempts to parse every output message for real-time progress updates. To capature a status message, use a group with name "m". To capture a percent complete as a number from 0 to 100, use a group with name "p".
Output filter regex
text
OutputFilterRegex
When set to a valid regular expression string, only output messages which match this expression will be logged.

Example:

# execute 7zip and only succeed if the executable returns a non-negative exit code
Exec c:\tools\7za.exe (
    Arguments: i *.*,
    SuccessExitCode: >= 0
);

Is this documentation incorrect or incomplete? Help us by contributing!

This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.

Generated from commit 46e90aca on master