Search folder and subfolders for excel files and open

  • Hi there,


    I am trying to use WScript.Shell to search a specific path for certain files. Problems is the path has over 1800 folders, and it takes a crazy amount of time to search each and every one. My question is, how could I search certain folders, for specific excel files. The folders I'm interested in all start with JOB-0 in the naming, going up to 0700 and more. And in each of these folders I want to search in the subfolders for .xls file and open it to collect some data.


    So lets break it down:


    Path: C:\Test\
    FolderSrchString = "JOB-0"
    SubFolderSearch = whatever the name is
    flExtension = *.xls*
    Open and then I run my own macro to extract the data, close and next folder/file loop.


    Any help would be appreciated. Thanks!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!