Hi everyone,
I have a forvalues loop along the following lines:
forvalues i = 1.01(.01)13.01 {
capture confirm file `i'SURVEY.csv
if _rc==0 {
blah blah blah
}
}
My list of files is along the lines of:
1.01SURVEY.csv
1.02SURVEY.csv
1.03SURVEY.csv
1.04DATA.csv
1.05SURVEY.csv.
The loop works perfectly for the first three files, then stops when it
gets to 1.04DATA ... I want it to go on to 1.05SURVEY. I attempted to
solve this problem with the capture confirm line, but no luck. I
think I need another expression along the lines of, "if _rc~=0,
(continue the loop)".
Many thanks,
Dorothy
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/