外部コマンドの実行で、複数のコマンドを実行する方法
Afficher commentaires plus anciens
感嘆符文字を利用することで、外部コマンドの実行ができます。
しかし、複数行にわたる内容を実行する方法がわかりません。
たとえば、「cd パス名」で現在のディレクトリを変更して、その後そのディレクトリにある実行ファイルを実行するといったようなことを行う方法が知りたいです。
たとえば、単純に複数行に
! cd C:\Users\Yuki
! hoge.exe
のように記述すると、二行目の実行のときにはディレクトリが戻ってしまうようでした。
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 起動と終了 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!