Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Obtaining the date of a text file


From   "Sebastian F. B�chte" <[email protected]>
To   [email protected]
Subject   Re: st: Obtaining the date of a text file
Date   Thu, 4 Jan 2007 01:45:05 +0100

On 1/3/07, David Doody <[email protected]> wrote:
I'm trying to obtain the date of a text file.  Actually, I need to
compare the dates of two text files to confirm that one is newer than
the other before I run a program.  I'll be doing this for hundreds of
subdirectories, so automating would be very useful.  I know Stata can
obtain the contents of a directory (using an extended macro function)
but all I've been able to get from that are file names and directory
names.  Am I missing something with that function, or is there another
easy way to obtain this information?  Thanks for any insights!

Dave,

there exists a program called -dirlist- which was written by Morten
Andersen. This program returns not only filenames but also other file
information. Try -ssc describe dirlist- from within Stata to learn
more about its functions. To install the programm you can enter -ssc
install dirlist- in the command window of Stata.

regards,
Sebastian
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index