Showing certain files in a dialog window
Show older comments
Hi,
I want to get a dialog window (uigetfile/uigetdir style) which shows files already filtered by a certain criteria (in this case, modification date being between 2 specified dates). I did discard undesired files by the use of datetime and isbetween:
foldinfo=dir();
foldinfo([foldinfo.isdir]) = [];
tempfile=struct2cell(foldinfo);
[y,m,d]=ymd(datetime(tempfile(2,:)));
c=datetime(y,m,d);
indexs=isbetween(c,Since,To);
foldinfo(indexs)=[];
where "Since" and "To" are datetime format. With this I end up only with the files of interest that I want to be displayed on the dialog box. However, I don't know how to allow the user to select files ONLY among the filtered files.
Does anybody know a way to do this?
Accepted Answer
More Answers (1)
Jordi Escuder Tisaire
on 24 Jul 2017
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!