How to use only specific files in directory in GUI?
Mostrar comentarios más antiguos
Hello all.
I have a GUI function that can open a directory/folder of images. What I would like to do is actually only select the files/images with the word "PU" in their titles. How would I be able to do this/approach this problem?
Thank you.
Respuestas (2)
Jan
el 15 de Feb. de 2019
folder = uigetdir('Choose a folder');
List = dir(fullfile(folder, 'PU*.*'));
FileName = fullfile(folder, {List.name});
for iFile = 1:numel(FileName)
File = FileName{iFile}
... now open it
end
Categorías
Más información sobre File Operations 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!