I wasn't able to get the compiled ML application to recognize the .csv file using the path 'input.csv' but the application did recognize it if I specified an absolute path (i.e., C:\MLApp\input.csv)
Compiled Matlab executable, invoked by Window's Task Scheduler, can't locate input .csv file inside current folder
4 views (last 30 days)
Show older comments
I've successfully compiled a ML script (wrapped by a function) which operates on a .csv file. That .csv file gets overwritten every 10 mins at which time (plus some delay) the script is scheduled by the Window's Task Scheduler to run. The script looks for input.csv in its current directory:
file_in = 'input.csv';
fid = fopen(file_in,'r');
if(~exist(file_in))
error('%s not found',file_in);
endif
But even when input.csv is placed in the same directory as the ML executable, the executable complains that the file doesn't exist when Window Task Scheduler starts the program. If I execute it manually, the script runs as expected without 'file not found' error.
0 Comments
Answers (1)
See Also
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!