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

st: capturing input file information


From   "Hudes, Estie" <[email protected]>
To   "'Statalist'" <[email protected]>
Subject   st: capturing input file information
Date   Mon, 12 Jan 2004 18:36:23 -0800

Dear Statalisters--

Is there an easy way to capture information of an input file into a local
macro, so it can be saved as a note with Stata data set? 

I am looking for information similar to that stored in c(filename) and
c(filedate) for a Stata dataset in memory,

For example, I can issue within Stata the command:

. dir "../rawdata/TNOutcomesqrypedsi.txt"

This will display on the screen

 785.9k  12/03/03 13:24  TNOutcomesQryPedsI.txt

I would like to save this information in a local macro, such as `inputinfo'

. insheet using "../4Petra/TNOutcomesqrypedsi.txt", names

(I thought that an macro extended function, with -display-, might do the
trick, but I couldn't get this to work.)

Thanks for your help,
--Estie Hudes

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Estie Sid Hudes, PhD, MPH
Specialist/Statistician
Center for AIDS Prevention Studies &
   Department of Epidemiology & Biostatistics
University of California, San Francisco
74 New Montgomery St., Suite 600
San Francisco, CA 94105
phone: 415/597-9126
fax: 415/597-9194
email: [email protected]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


*
*   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