How to save the output of an executable file in a different directory than current running directory?
2 次查看(过去 30 天)
显示 更早的评论
I am running an executable file using system command in matlab. The output which I get after the processing is to be saved in a different directory. Can anybody please help me out with this? Thank you.
0 个评论
回答(2 个)
Fangjun Jiang
2017-7-24
Run your MATLAB script or function in your desired directory, use system() command by specifying the location of your executable, e.g. system('c:\myFolder\myExecutable.exe')
Walter Roberson
2017-7-24
Your executable does not appear to have any way to tell it which directory to read from (other than perhaps the current directory) or which location to write to (other than perhaps the current directory).
Potentially the executable has command line options telling it what to do, but that would be at the executable level.
Perhaps you could copy the input file into the directory where you need the output, cd to there, run the program
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!