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

st: RE: Re: RE: double quotes, macros, and foreach commands... oh my


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: RE: double quotes, macros, and foreach commands... oh my
Date   Fri, 5 Dec 2003 14:51:29 -0000

Much better than my suggestion. Many thanks. 

Nick 
[email protected] 

Michael Blasnik
 
> In regard to the second question, there is a simple way to 
> get a directory
> listing into a macro using Stata 8:
> 
> local datfiles: dir . files  "*.dat"
> 
> will put all .dat files in the current directory into the 
> local macro
> datfiles.  Each file name will be enclosed in double 
> quotes.  You can then
> use the code shown at the end of Nick's posting (levels, 
> followed by a
> loop).  See -help local- and look for the extended macro 
> function -dir- for
> a syntax explanation.

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