Hello,

I have a large dataset that I have split into 10 chunks, I have written some code to loop through each Stata table applying the same processing code. However, when I highlight the script on the.do file, the code is printed on the Stata screen - but nothing happens - no errors, but the .dta files are not read into Stata as I would expect.

The beginning of the .do file is like this:

cd "X:xxxxxx\xxxxxx\xx"
local files: dir "." files "q10*.dta"

foreach files of local files {

Processing script e.g. merge and drop, creation of new variables

save `file', replace


}

I am at a loss as to what I am doing wrong.