Showing certain files in a dialog window
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (1)
Jordi Escuder Tisaire
le 24 Juil 2017
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!