外部コマンドの実行で、複数のコマンドを実行する方法
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
感嘆符文字を利用することで、外部コマンドの実行ができます。
しかし、複数行にわたる内容を実行する方法がわかりません。
たとえば、「cd パス名」で現在のディレクトリを変更して、その後そのディレクトリにある実行ファイルを実行するといったようなことを行う方法が知りたいです。
たとえば、単純に複数行に
! cd C:\Users\Yuki
! hoge.exe
のように記述すると、二行目の実行のときにはディレクトリが戻ってしまうようでした。
0 commentaires
Réponse acceptée
stozaki
le 11 Jan 2021
Yuki Koyama 様
cd はwindowsのシステムコマンドでなくとも、MATLABのコマンドでサポートされています。
1行目はMATLABのコマンドで実行しては如何でしょうか?
stozaki
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!