Hi,
I'm appending separate country files in to one (US_1.dta, US_2.dta.........GB_1.dta,GB_2.dta). All of the files are stored in the same folder.
The code I'm using currently to do this is .
However, the list of countries has now grown unmaneagable with 1000 files produced in the folder. Can I create a loop that first searches first for a countryname (US, GB, FR etc) " `i' " and then a numbering structure (_1,_2..._5) " `j' " ?
Thanks
Ciaran
I'm appending separate country files in to one (US_1.dta, US_2.dta.........GB_1.dta,GB_2.dta). All of the files are stored in the same folder.
The code I'm using currently to do this is .
Code:
use US_1.dta forvalues i = 2 / 5 { append using US_part`i' } save US.dta
Thanks
Ciaran