Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[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 <[email protected]>
To
[email protected]
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/