I have a directory of subdirectories corresponding to months/ years with each subdirectory named (subyymm, ex: sub1712). I have subdirectories for each month from sub1712 - sub1812. Within each subdirectory is a .txt file called "sub_data.txt', and this is consistent across all subdirectories. I was wondering would would be a quick way to loop through each subdirectory and append all 13 sub_data.txt files together? Right now I append one at a time, and this seems inefficient.
Thank you!
Related Posts with Looping through specific files in multiple subdirectories?
Calculate difference across rows by the value of a third variableHi experts, My data are like below. It consists of one variable price, and another variable group. …
if loops?Hello! I'm a PhD student and relatively new to Stata. I have medicaid data, and I am assessing for …
Converting factor notation into dummies.Dear All, I want to conduct a two-stage least squares regression using the ivreg2 command. I have q…
Add one overall note, text or caption to a combined coefplotHi I use coefplot to stack several graphs together. When I want to add a note, it adds to each sub g…
Replacing ICD value to another value in a datasetDear Stata Expert I would much appreicate your help on this issue. In a dataset where variabled DX1 …
Subscribe to:
Post Comments (Atom)
0 Response to Looping through specific files in multiple subdirectories?
Post a Comment