Dear all,
Basically, what I have is a small database. A folder that contains many folders inside (each with some dta files). The code that I have it performs some adjustment for each file and saves this file in the same folder, and it does that for each file in a folder.
However, I only specified that a code works only with a particular folder and I need so that it goes to every folder automatically and does the procedure that already works.
The line of code I used for single folder is:
local files = ""
local files : dir "${path}" files "*.dta"
display `"`files'"'
I suppose that to make it search every single folder in a given directory, I need to start with smh like
foreach folder in folderlist {
local files = ""
local files : dir "${path}" files "*.dta"
display `"`files'"'
I would appreciate your help on restructuring a code in a way that it would work with all folders in a directory
Basically, what I have is a small database. A folder that contains many folders inside (each with some dta files). The code that I have it performs some adjustment for each file and saves this file in the same folder, and it does that for each file in a folder.
However, I only specified that a code works only with a particular folder and I need so that it goes to every folder automatically and does the procedure that already works.
The line of code I used for single folder is:
local files = ""
local files : dir "${path}" files "*.dta"
display `"`files'"'
I suppose that to make it search every single folder in a given directory, I need to start with smh like
foreach folder in folderlist {
local files = ""
local files : dir "${path}" files "*.dta"
display `"`files'"'
I would appreciate your help on restructuring a code in a way that it would work with all folders in a directory
Comment