Dear Statalist users,
First-time poster here. I am trying to run many do files that will transform my .dat files into .dta files. They are all in the same folder, but are not necessarily named uniformly. Usually, they take the general pattern of Z01 through Z17, but often have letters following, so Z02A Z02B, and it is not a consistent pattern.
I have found the -: dir- command, but it does not seem to be running the files. I do not have much code, all I have written so far is
local files: dir "directory" files "*.do"
foreach file in `files' {
do`files', clear
}
I am running Stata 14 at the moment. Thank you in advance!!
First-time poster here. I am trying to run many do files that will transform my .dat files into .dta files. They are all in the same folder, but are not necessarily named uniformly. Usually, they take the general pattern of Z01 through Z17, but often have letters following, so Z02A Z02B, and it is not a consistent pattern.
I have found the -: dir- command, but it does not seem to be running the files. I do not have much code, all I have written so far is
local files: dir "directory" files "*.do"
foreach file in `files' {
do`files', clear
}
I am running Stata 14 at the moment. Thank you in advance!!
Comment