Automatically discover folder path

Automatically discover folder path.

I've searched high, low and sideways on how to get a button click event to automatically search for a particular folder, without having to use the browser dialog method.

I'd like to have the program search all hard drives and folder roots to locate and then display the path of a known folder name without the user having to browse themselves.

for example I'd like to be able to, at a click of a button, display in a text box the folder path to a folder called Folder1, even though that folder path may be G:\MainFolder\MiddleFolder\LowerFolder\Folder1.

All the methods I've found have required either me as the programmer to put a path in an argument and then COMPARE or for the user to have to browse for the folder.

This really should be so simple an operation but do you think I can find any resources to advise me

Any sugguestions (in Newbie Plain English Format) would be much appreciated.




Answer this question

Automatically discover folder path

  • rayhojka

    Hi,

    Is your problem solved

    Thank you,
    Bhanu.



  • Steve.W19324

    Like you, I am a newbie programmer too, but if I were trying to do this I would recursively loop through all the folders on a drive & compare each folder name found with the one you are looking for, until you find a match. Also, I believe that VB has a way to discover all of the drives that are in your system, so using both of these methods together should get you what you need. I hope this helps...
  • Automatically discover folder path