Hi everybody!!

I have downloaded 32 *.dta files of the Permanent Household Survey of Argentina that is conducted quarterly.
I had generated new variables to calculate the net enrollment rate (NER) for the 4th 2010 quarter. But I will have to do the same 31 times more. The NER is a measure of the proportion of primary school age children who are enrolled in primary school.

I couldn't find the answer in the forum of what to do in this cases.

Only for the 4th 2010 quarter I' have done this:

Code:
gen primary=1 if ch12==2 & ch10==1
replace primary=0 if ch12!=2
replace primary=0 if ch12==2 & ch10==2
ci primary [fw=pondera] if ch06>=6 & ch06<=11 & ch12!=9 & ch10!=0
But I need to do the same with another 31 datasets more. The files are all of them in the same directory and the title of the files are like "individual_t110.dta" (first quarter of 2010), "individual210.dta" (second quarter of 2010), "individual310.dta" (third quarter.. ), "individual410.dta" (4th quarter) and the same for 2011, 2012, 2013 ... 2018.

I know that the solution is a loop, but I'm a begginer.

Thanks!!!