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

st: re: read files under certain directory automatically


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: read files under certain directory automatically
Date   Mon, 18 Jul 2005 14:03:54 -0400

Luhang asked

Can stata put all the file names of data sets under certain directory
into a macro? Or is there some other way to read the data sets under
certain directory antomaticcally?

Nick Cox' fs command (ssc desc fs) does that. After fs *dta it will return r(files) containing a list of each filename. You may then move that to a macro of your own and loop through the filenames therein.

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html

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