Oops; clearly I didn't understand the question.  I thought Loren needed 
creation date on files in a directory. Thanks for clearing it up Simon.

J.




Message: 3
Date: Wed, 29 Oct 2008 08:58:42 -0700
From: Julin Maloof <[EMAIL PROTECTED]>
Subject: Re: [R-SIG-Mac] File creation date
To: [email protected], Loren Engrav
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Loren,

Try the following.  You need to have XCode developer tools installed.  Assumes 
that you working directory is where the files of interest are.  Otherwise add a 
path to the ls command.



files <- system("ls",intern=T)

date <- vector(mode="character",length=length(files))

names(date) <- files

for (f in files) {
        date[f] <- system(paste("/Developer/Tools/GetFileInfo -d 
'",f,"'",sep=""), intern=T)
        }
        


Message: 4 Date: Wed, 29 Oct 2008 12:08:53 -0400 From: Simon Urbanek <[EMAIL PROTECTED]> Subject: Re: [R-SIG-Mac] File creation date To: Loren Engrav <[EMAIL PROTECTED]> Cc: "[email protected]" <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes On Oct 28, 2008, at 19:03 , Loren Engrav wrote:
> Sorry my email was unclear
> I am looking at files within a saved R workspace
>
> The date of the workspace file is 3/18/2007 but I don't think all of > the > files were created on that date as I think I used the workspace over > some
> period of time
>
> So I would like the creation date of the files WITHIN the workspace
>

There is no file *within* the workspace. The workspace *is* one file of serialized R objects and they themselves don't have any timestamp associated with them. So all you can find out is when you last saved (or accessed) the workspace, that's all.

Cheers,
S

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to