I have an M file which obtains data from xls and csv files. There has been an occurance of these data files not being updated as they should have been and I would like Matlab to issue a warning if the files are over a certain age.
Is there a way I can obtain the last modified date of file using Matlab.
Looking in help dir and ls only give the file name and fileattrib appears to only give on/off type atrributes such as if it is a hidden file.
|
|
0
|
|
|
|
Reply
|
Carl
|
8/26/2010 3:36:08 PM |
|
"Carl " <carl.meade@sse.com> wrote in message <i561l8$9o9$1@fred.mathworks.com>...
> I have an M file which obtains data from xls and csv files. There has been an occurance of these data files not being updated as they should have been and I would like Matlab to issue a warning if the files are over a certain age.
>
> Is there a way I can obtain the last modified date of file using Matlab.
> Looking in help dir and ls only give the file name and fileattrib appears to only give on/off type atrributes such as if it is a hidden file.
What about the datenum field of the structure returned by dir?
|
|
0
|
|
|
|
Reply
|
Andy
|
8/26/2010 3:46:20 PM
|
|
> What about the datenum field of the structure returned by dir?
That is perfect. Thanks.
How did I miss that when looking through help?
|
|
0
|
|
|
|
Reply
|
Carl
|
8/27/2010 8:13:08 AM
|
|