How to sort the files in a folder by date?
152 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Salad Box
am 31 Jan. 2019
Kommentiert: J Tian
am 9 Nov. 2020
Hi,
For example, I have 3 image files in a folder, looks like below (Fig 1).
![10.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/202264/10.png)
I then tried to get the information of the image files by:
startpath=pwd;
>> list=dir(startpath);
I get (Fig 2):
![11.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/202265/11.png)
I wonder how can I sort the files in the list (excluding the top two '.' and '..') by date (from early to late)?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!