I need to check whether a text file in a folder exists. If it does, I need to load the value from the text file. If not, I need to carry on with the next iteration.
I know how to load the value from the text file using the function called load.
e.g.
emo = load(fullfile(BASE_DIR,List1(3).name));
But I’m not sure how to check whether a text file exists in the folder.
Need help in this. Really would appreciate any help.
Use the
EXISTfunction.