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

st: r(files) only with dta files

From   "Nikhil Teja" <[email protected]>
To   [email protected]
Subject   st: r(files) only with dta files
Date   Mon, 8 Sep 2008 12:15:40 +0530


I have the following problem, I want to run a loop on all the dta
files in a directory, I currently have the following code, but am
having difficulties because I get an error when a do file is included
in the r(files) macro. Is there anyway I can run this only on .dta
files? My code is as following...

log using jfilesearch, replace
foreach var in `r(files)' {
use `var'
capture, describe *gdp*
log close

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index