MATLAB: How to obtain the date and time (datenum) of a .txt saved in the harddrive

data importMATLABtext filetime

I have multiple .txt files with mxn-arrays saved at different date and time.
I wonder if it is possible to write a command line that generates the date and time of the files?
Thank you for your attention
Emerson

Best Answer

D=struct2cell(dir('*.txt'))
file=D(2,:)'
% your files are
fle{1},file{2},
% if your files are in folder "fold" use
dir('fold/*.txt')