Thread Subject: Reading Directory Created Date

Subject: Reading Directory Created Date

From: Blaine

Date: 20 Apr, 2009 18:27:02

Message: 1 of 4

I am by no means new to matlab, but for the life of me i cannot find a way to read the created date of a directory. Pointers anyone?

Thanks!

Blaine

Subject: Reading Directory Created Date

From: Fangjun Jiang

Date: 20 Apr, 2009 20:15:19

Message: 2 of 4

Folder=dir('*.');

Then Folder is a struct array that gives you 'name','date','bytes','isdir', etc.

"Blaine " <EvilDonut0@gmail.com> wrote in message <gsiepm$sh0$1@fred.mathworks.com>...
> I am by no means new to matlab, but for the life of me i cannot find a way to read the created date of a directory. Pointers anyone?
>
> Thanks!
>
> Blaine

Subject: Reading Directory Created Date

From: Bass

Date: 5 Nov, 2009 17:45:21

Message: 3 of 4


the date returned by matlab's dir function is the "Date Modified" NOT "Date Created"

Does anyone know how to get "Date Created" ?
 

"Fangjun Jiang" <f@j.com> wrote in message <gsil4n$d23$1@fred.mathworks.com>...
> Folder=dir('*.');
>
> Then Folder is a struct array that gives you 'name','date','bytes','isdir', etc.
>
> "Blaine " <EvilDonut0@gmail.com> wrote in message <gsiepm$sh0$1@fred.mathworks.com>...
> > I am by no means new to matlab, but for the life of me i cannot find a way to read the created date of a directory. Pointers anyone?
> >
> > Thanks!
> >
> > Blaine

Subject: Reading Directory Created Date

From: Fangjun Jiang

Date: 18 Nov, 2009 21:43:16

Message: 4 of 4

This seems challenging. This might be a solution but not so elegant.

In DOS, you can use 'dir /T:C' to show the creation date of the folder or file.
So, in Matlab

folder=pwd;
[flag,text]=system(['dir ',folder,' /T:C'])

You'll get the creation date for all the files and directory under the folder. The first entry marked by '.' is the one you want. You might be able to use regular expression to extract that creation date from the whole text.

Again, this is my solution so far. I am not really satisfied with it though.

"Bass " <bassam.atallah@gmail.com> wrote in message <hcv2vh$9ca$1@fred.mathworks.com>...
>
> the date returned by matlab's dir function is the "Date Modified" NOT "Date Created"
>
> Does anyone know how to get "Date Created" ?
>
>
> "Fangjun Jiang" <f@j.com> wrote in message <gsil4n$d23$1@fred.mathworks.com>...
> > Folder=dir('*.');
> >
> > Then Folder is a struct array that gives you 'name','date','bytes','isdir', etc.
> >
> > "Blaine " <EvilDonut0@gmail.com> wrote in message <gsiepm$sh0$1@fred.mathworks.com>...
> > > I am by no means new to matlab, but for the life of me i cannot find a way to read the created date of a directory. Pointers anyone?
> > >
> > > Thanks!
> > >
> > > Blaine

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
created Blaine 20 Apr, 2009 14:30:22
created date Blaine 20 Apr, 2009 14:30:22
directory Blaine 20 Apr, 2009 14:30:22
folder Blaine 20 Apr, 2009 14:30:22
date Blaine 20 Apr, 2009 14:30:22
rssFeed for this Thread

Contact us at files@mathworks.com