Have you ever had the need to search for Directories / Folders ?
No NOT Files within directories but ALL instances of a particular Directory name.
eg C:\Testing\Somedir, where Somedir is the Directory you wish to search for.
Lets say that you wish to search your system for a Directory, either ALL instances or the 1st instance ie you are not sure that a user has placed / saved / unzipped etc your files to the directory structure that you have set-up, so you need to do a search of the users system for that Directory name!
Not an easy task IF you have found a way. Using WMI and it's query interface ExecQuery it is now more manageable, here's how.
With the routine below it is easy to find the Directory/Folder within the persons computer system. Note, I said system = ALL drives and folders, sub directories within his system.
Just change the name of the Directory / Folder you wish to search for. There is the option to get the 1st instance of the name OR get ALL instances.