Hello Statalist--
Currently appending several dta files together and came up with the following code
However I want to add a variable that reflects the original filename of the source. I know this can be done with the generate(newvar) command but not too sure where in my loop it would go? Any help will be greatly appreciated!
Currently appending several dta files together and came up with the following code
Code:
clear fs *.dta use .dta local getfile "append using " foreach file in `r(files)' { `getfile' `file' }
Comment