Hello all,
I am extracting data from .txt file format using do file and the same do file has to run for different folders with names 2008, 2009... 2013. How can I create a loop to do the same. As of now, I am doing like this:
Thanks
I am extracting data from .txt file format using do file and the same do file has to run for different folders with names 2008, 2009... 2013. How can I create a loop to do the same. As of now, I am doing like this:
Code:
global pathin "D:/My Disc/2008/rawdata" global pathout "D:/My Disc/2008/data/extracted" infix ... using "$pathin/as1.txt",clear save "$pathout/as1.dta", replace global pathin "D:/My Disc/2009/rawdata" global pathout "D:/My Disc/2009/data/extracted" infix ... using "$pathin/as2.txt",clear save "$pathout/as2.dta", replace
Comment