I am trying to append .csv files from multiple folders within folders. I have 8 parent folders with around 8 folders inside each parent folder. The csv files are within these last set of folders. My code is as follows:
Code:
* get list of parent folders
local folderList1 : dir "$orig" dirs "*"
* loop through parent folders
foreach folder1 of local folderList1 {
* get list of child folders
local folderList2 : dir "$orig/`folder1'" dirs "*"
* loop through child folders
foreach folder2 of local folderList2 {
* get list of files
local fileList : dir "$orig/`folder1'/`folder2'" files "*.csv"
* loop through files
foreach file of local fileList {
clear
insheet "`file'"
** appending code
}
}
}
0 Response to "dir" command not preserving case
Post a Comment