How to run an exe file and save the outputfile generated to a different folder?
4 次查看(过去 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?
0 个评论
回答(1 个)
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:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!