I have multiple .dta files with complicated names which i want to substring from and rename to a simple format.
i get the following error:
invalid syntax
r(198);
my command:
clear
set more off
local folder "U:\Blah"
local files : dir "`folder'" files "*.dta"
foreach file of local files {
local name = subinstr("`file'",15,13)
!rename "file" "name"
}
i get the following error:
invalid syntax
r(198);
my command:
clear
set more off
local folder "U:\Blah"
local files : dir "`folder'" files "*.dta"
foreach file of local files {
local name = subinstr("`file'",15,13)
!rename "file" "name"
}
Comment