Compiled Matlab executable, invoked by Window's Task Scheduler, can't locate input .csv file inside current folder
Mostrar comentarios más antiguos
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.
Respuestas (1)
Minh Tran
el 24 de Jul. de 2017
0 votos
Categorías
Más información sobre String Parsing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!