Borrar filtros
Borrar filtros

Timestamp of files in a folder.

6 visualizaciones (últimos 30 días)
Kent,et
Kent,et el 13 de En. de 2015
Comentada: supernoob el 2 de Oct. de 2018
Hi,
I have a a given number, nb, of file in a folder, how can I extract the timestamp of every file in the folder? What's the easiest way to do it? Filenames are such as filename_001 to filename_nb.
D = finename); TimeStamp = {D.datenum}; enables to extract the data of a file.
Many thanks,
Kent

Respuesta aceptada

Guillaume
Guillaume el 13 de En. de 2015
Matlab's dir command returns the modification date of the files as one of the field of its output structure.
d = dir(fullfile(foldername, 'filename_*');
struct2table(d); %or whatever you want to do with the structure

Más respuestas (1)

Kent,et
Kent,et el 13 de En. de 2015
Thanks for quick response, works :)
  2 comentarios
Titus Edelhofer
Titus Edelhofer el 13 de En. de 2015
Then please mark the question as answered ...
Titus
supernoob
supernoob el 2 de Oct. de 2018
Hi Titus, Dir() returns the modification time with second precision, is there any way to get ms precision?

Iniciar sesión para comentar.

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!

Translated by