フィルターのクリア

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 Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by