How can I open a file from different directories with a standalone application?
131 views (last 30 days)
I have a standalone exe made using MATLAB. This exe reads UFF files (not defined in MATLAB), and plots them.
This exe can only open UFF files located in the same directory of exe. When I try to open an UFF file in different folder (say C:\folder\testing.UFF)**, it only gets the filename (I use uigetfile) and plots nothing - reads noting. (Because there is no file with that name (testing.UFF) in the exe's location.)
I want to read that file, whereever it is!
Image Analyst on 3 May 2013
folder = 'C:\folder\';
baseFileName = 'testing.UFF';
fullFileName = fullfile(folder, baseFileName);
% Open the file however you do
% File does not exist.
warningMessage = sprintf('%s does not exist', fullFileName);