Workspace 6.21.5
SystemCommand

Executes a system command as a separate process, optionally capturing its output and returning it to Workspace. This operation can be used to execute any third-party process, such as standard system commands (like directory listings), or custom executables like computational solvers.

  • Default label: "System command"
  • Member of plug-in: Built-in
  • Catalogue path: Builtin/System
Inputs:
CommandQStringThe command to execute; e.g. "ls" without the quotes.
ArgumentsArrayQString

Working directoryQStringThe directory that the command should be executed in.
Environment variablesArrayQStringAny array input of environment variables to set. These should be entered as name=value pairs, e.g. PATH=/path/to/something
Wait for completionboolIf enabled, the operation will block execution until the command has completed executing.
Capture outputboolIf enabled, the operation will capture the output of the command and make it available to the executing Workspace via the Command output output.
Log outputboolIf enabled, the operation will print the output of the command to the Workspace log.
Fail on non zero exit codebool

Tick this to set operation fail when the command exit with non-zero code.

Outputs:
Command outputQString

Exit codeint