How to sort the files in a folder by date?
121 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Salad Box
el 31 de En. de 2019
Comentada: J Tian
el 9 de Nov. de 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 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre File Operations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!