フィルターのクリア

How to run an exe file and save the outputfile generated to a different folder?

7 ビュー (過去 30 日間)
Shazed Tashrif
Shazed Tashrif 2020 年 3 月 27 日
回答済み: Anurag Agrawal 2020 年 3 月 30 日
executefile = fopen('ENTER.txt','w');
fprintf(executefile,strcat('\n','\n','\n','\n'));
fclose(executefile);
system('my.exe < ENTER.txt');
I am trying to execute my.exe that requires 4 enter to run. After running the program, it generates some file in the current folder, how can I direct these files to a different folder?

回答 (1 件)

Anurag Agrawal
Anurag Agrawal 2020 年 3 月 30 日
Hi
You can use movefile function to move your file to the desired folder
movefile source destination
For more details, you can check the documenation page:

カテゴリ

Help Center および File ExchangeMATLAB Code Analysis についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by