Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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 <>
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 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, because every
time Stata starts it will look along its ado-path for a file called 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,
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index