Search for a file and return the path

Hi (Windows Systems)
How i can search for file name pg_dumpall.exe and return the path off the file

If you Google for “Windows search api” you will find a lot of info.

That said, IMHO Windows search is about as useful as a dead dog. Not only is it always horribly slow, not only does it return screeds of unwanted crud, but several drives tend to be never indexed on my systems. It is rubbish.

Best would be to do the search yourself, especially if you have some clue as to where the file might be. Maybe use declares and the findfirstfile call. ( IIRC there is sample code in the Windows Functionality Suite ).