外部コマンドの実行で、複数のコマンドを実行する方法
Ältere Kommentare anzeigen
感嘆符文字を利用することで、外部コマンドの実行ができます。
しかし、複数行にわたる内容を実行する方法がわかりません。
たとえば、「cd パス名」で現在のディレクトリを変更して、その後そのディレクトリにある実行ファイルを実行するといったようなことを行う方法が知りたいです。
たとえば、単純に複数行に
! cd C:\Users\Yuki
! hoge.exe
のように記述すると、二行目の実行のときにはディレクトリが戻ってしまうようでした。
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 起動と終了 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!