dos

Executes a dos command on Windows.

Syntax

R1 = dos(stringCommand)

[R1, R2] = dos(stringCommand)

Inputs

stringCommand
Command to be executed
Type: string

Outputs

R1
The status of the dos command executed
Type: integer
R2
Optional output which contains any text echoed to standard output when the system command is executed.
Type: string

Examples

Run the dos command, without retrieving the output:
R = dos('echo %date% %time%')
R = 0
Run the dos command, with the text displayed to standard output:
[R1, R2] = dos('echo %date% %time%')
R1 = 0
R2 = Fri 02/09/2018 12:24:58.52