Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> Ferramentas Windows > dos

dos

shell (cmd) command execution (Windows only)

Calling Sequence

bOK=dos(command-name)
bOK=dos(command-name,'-echo')
[output,bOK]=dos(command-name)
[output,bOK,exitcode]=dos(command-name)
[output,bOK]=dos(command-name,'-echo')
[output,bOK,exitcode]=dos(command-name,'-echo')

Description

Sends a string command-name to Windows for execution by the cmd shell. Standard output and standard errors of the shell command are written in the calling shell. bOK returns if command has been executed.

[output,bOK] = dos(command-name,'-echo') forces the output to the Command Window, even though it is also being assigned into a variable.

exitcode value returned by the external process.

To open the notepad editor and return control immediately to Scilab dos('start notepad')

Examples

[s,w] = dos('dir');
[s,w] = dos('dir','-echo');
dos('start notepad')
dos('taskkill /IM notepad.exe') // Caution, this command will kill all launched notepad's processus
[s, w] = dos('foo')
[s, w, code] = dos('dir')
[s, w, code] = dos('foo')

See Also

  • unix — execução de comando shell (sh)
Report an issue
<< createGUID Ferramentas Windows findfileassociation >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:18:25 CEST 2014