What is wrong with commands in this Stata do-file? I am trying to open all batch files that are in separate sub-folders named Batch1-Batch2-..... to Batch32. These subfolders are in Output folder.
Also is there any way to append them using loops in Stata rather than doing one by one?



clear all
gl outputs "E:\Outputs"

forvalues i = 1/32 {
import delimited "$outputs/Batch`i'/batchfile.tab", clear
tempfile batchfile_`i'
save `batchfile_`i''
}