dos
Execute a command with the operating system shell.
📝Syntax
status = dos(command)
[status, output, duration] = dos(command)
📥Input Arguments
Parameter Description
command string scalar or character vector: command to execute in the operating system shell.
'-echo' optional flag that also displays command output in the command window.
📤Output Arguments
Parameter Description
status integer exit status returned by the shell command.
output text captured from standard output and standard error.
duration execution duration in milliseconds.
📄Description

dos executes a command through the operating system shell and returns the exit status.

With output arguments, Nelson can also return the command text output and execution duration. dos follows the same command execution model as system.

💡Examples
Run a shell command and capture its output.
[status, output] = dos('echo Nelson')
🔗See Also
system
Used Functions
system
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub