Hello,
I am using the following code to import around 7000 txt files and I get the error "too many filenames". Any tips?
Thank you
local filenames: dir "." files "*.txt"
tempfile building
save `building', emptyok
foreach f of local filenames {
clear
set obs 1
gen filename = "`f'"
gen strL text = fileread("`f'")
append using `building'
save `"`building'"', replace
}
use `building', clear
I am using the following code to import around 7000 txt files and I get the error "too many filenames". Any tips?
Thank you
local filenames: dir "." files "*.txt"
tempfile building
save `building', emptyok
foreach f of local filenames {
clear
set obs 1
gen filename = "`f'"
gen strL text = fileread("`f'")
append using `building'
save `"`building'"', replace
}
use `building', clear
Comment