Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Obtaining save date of data file


From   "Ed Bassin, Ph.D." <edbassin@profsoft-health.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Obtaining save date of data file
Date   Fri, 13 Dec 2002 18:13:56 -0500

Is there a way to programmatically obtain the date that a file was last
saved and store that information in a macro?  I need to compare two files
and make sure that file B is newer than file A.  I would like to obtain the
information displayed in describe and store that in a macro.  It is not one
of the listed returns.  The only solution I have been able to come up with
involves creating a log file, running a describe statement on the dataset,
closing the log file, reading the log file using the file command, going to
the appropriate row and column of the file, and taking a substring to put
the date into memory.  There's got to be a better way!

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index