Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilabヘルプ >> Windows tools > dos

dos

シェル (cmd) コマンド実行 (Windows専用)

呼び出し手順

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')

説明

コマンドシェルで実行するために コマンド名の文字列をWindowsに送信します. シェルコマンドの標準出力および標準エラーが呼び出し側のシェルに 書き込まれます. コマンドが実行された場合は, bOK が返されます.

[output,bOK] = dos(command-name,'-echo') は, 出力先が特定の変数へ割り付けられている場合でも コマンドウインドウへの出力を強制的に行ないます.

外部プロセスによる終了コードの値が返されます.

ノートパッドエディタをオープンした後,すぐに Scilabに制御を戻すには以下のようにします: dos('start notepad')

[s,w] = dos('dir');
[s,w] = dos('dir','-echo');
dos('start notepad')
dos('taskkill /IM notepad.exe') // 注意:このコマンドは全てのノートパッドのプロセスを終了します
[s, w] = dos('foo')
[s, w, code] = dos('dir')
[s, w, code] = dos('foo')

参照

  • unix — シェル (sh) コマンドを実行
Report an issue
<< Windows tools Windows tools consolebox >>

Copyright (c) 2022-2023 (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:19:09 CEST 2014