Loop Through All Files In Subdirectories Of A DirectoryFeb 26, 2010
I am having a bit of trouble with a bit of code. I have a bunch of code that I want to run on all excel files that live one level down from my main directory.
I have a general directory (orders) which contains a variable amount of subfolders each month (in picture below, 'Dan', 'Frank', 'Steve'), and I would like to look through all the excel files in 'Dan', 'Frank', 'Steve', but not in the main directory (orders), or any subdirectories within 'Dan', 'Frank', 'Steve'.
I am able to loop through all the excel files in the subdirectories individually if I hardcode the directory names, but as they are variable,