Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: capture the date associated with a specific file


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: capture the date associated with a specific file
Date   Fri, 3 Aug 2012 16:52:34 +0200

On Fri, Aug 3, 2012 at 4:42 PM, E Michael Foster wrote:
> Any way to capture the date stamp of a file in the directory where one is working?
> I have a little code in profile.do that I want executed depending on the modification date of some file in the stata directory.

If you open the file than the time it was last saved will be available
in c(filedate).

I would be careful with calling a .do file profile.do, because every
time Stata starts it will look along its ado-path for a file called
profile.do and it will run that .do file. This is a convenient way of
customizing Stata, but it also means you will have to be careful not
to put a file with that name by accident in the adopath, and even
safer is not to use that name at all.

Hope this helps,
Maarten
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index