Find Folders

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Anybody have a quick solution to locate a folder (not a file) with only part
of the folder name? Actual folder name could be "2206516_BlahBlahBLah"
however the "BlahBlahBlah" portion is an unknown...
__________________________________________________________________
Dim MyPath as string
Dim MyPieceOfFolderName as string
Dim MyTargetFolderName as string 'Should be something like *

MyPath = "C:\WorkingFolder\"

MyPieceOfFolderName = "2206516"

MyTargetFolderName = DIR(MyPath & MyPieceOfFolderName & "*")

Do While MyTargetFolderName <> ""
Debug.Print MyTargetFolderName
Loop
__________________________________________________________________
Thank you in advance for any information you can provide locating these
folders with only partial folder names...~ SPARKER ~
 
Back
Top