View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_2_] Robert Crandal[_2_] is offline
external usenet poster
 
Posts: 158
Default Enumerate all subfolders?

My target folder is "C:\UserFolders". I would like to run a
search of this directory and obtain the names of all subfolders.
Im only searching for folder names, not filenames. Also, this
search should only go one level...I'm only interested in
obtaining the names of the folders that exist in the target
folder "C:\UserFolders".

Can someone show me how to do this? It would be nice if
I could store all the folder names in an array of strings. Or,
it would also be nice if I could just enumerate through
each folder string one at a time using a single string variable.

Thank you!