I have two folders with exactly similar file names inside them. I would like for these files to be appended with each other.
For example, interview__33 from Folder v2 should be appended with interview__33 from Folder v3.
I used this codes:
global v3 "C:\Users\lm2\Desktop\Raw Files\20190816"
global v2 "C:\Users\lm2\Desktop\Raw Files\v2"
global temp ""C:\Users\lm2\Desktop\Raw Files\20190816\temp"
cd "$v2"
local dta: dir . files "*.dta"
foreach f of local dta {
use "`f'", clear
append using "$v3\`f'"
save "$temp\`f'", replace
}
The error is: r(601);
File C:\Users\lm2\Desktop\Raw Files\20190816 not found
Related Posts with Appending Files with Similar Name but From Different Folder
Is there a more efficient way to replace a full variable on Stata please?[CODE] * Example generated by -dataex-. To install: ssc install dataex clear input str19 childspostc…
Running Commands Pulls Up Help WindowFor some reason, everytime I run a command (either in the command bar or pressing CTRL + D in my do …
Significance of regressor effect with and without moderatorHi, I am running fe panel data regression on a set of companies to explore the effect of firm geogra…
2SLS regressionGood morning, I hope all Texas users are keeping safe. I'm exploiting a rotating panel with 6115 obs…
Descriptive statsHello ! so i hvae trying this code i found in a tutorial to create a table similar to the one joind …
Subscribe to:
Post Comments (Atom)
0 Response to Appending Files with Similar Name but From Different Folder
Post a Comment