필터 지우기
필터 지우기

Timestamp of files in a folder.

조회 수: 6 (최근 30일)
Kent,et
Kent,et 2015년 1월 13일
댓글: supernoob 2018년 10월 2일
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

채택된 답변

Guillaume
Guillaume 2015년 1월 13일
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

추가 답변 (1개)

Kent,et
Kent,et 2015년 1월 13일
Thanks for quick response, works :)
  댓글 수: 2
Titus Edelhofer
Titus Edelhofer 2015년 1월 13일
Then please mark the question as answered ...
Titus
supernoob
supernoob 2018년 10월 2일
Hi Titus, Dir() returns the modification time with second precision, is there any way to get ms precision?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by