How can i search for files of a particular type say .jpg
files in a particular folder using uigetfile()
?
It will be very helpful if files in the sub-folders can also be searched for?
How can i search for files of a particular type say .jpg
files in a particular folder using uigetfile()
?
It will be very helpful if files in the sub-folders can also be searched for?
You could first fetch all files from the directory (and subdirectories). There's an excellent answer for this problem. Look here: How to get all files under a specific directory in MATLAB?. To select the folder you can use the matlab command: uigetdir
Subsequently just loop over the list and collect all names that end with ".jpg".
Something like that should do:
[FileName,PathName] = uigetfile('*.jpg','Select the image file');
Check the documentation for more details.