D:\code\ch11\Find\bin\Debug>Find *media* "c:\Program Files" > temp.txt
Searching c:\Program Files for "*media*"
Windows Media Player c:\Program Files D
VideoMediaHandler.dll c:\Program Files\Movie Maker F
VideoMediaHandler.dll.mui c:\Program Files\Movie Maker\en-US F
3 results found
Note
You
may get an “access denied” error while running this program when the
search runs across a folder you don’t have permission to access. One
way to handle this is to change the search options to SearchOption.TopDirectoryOnly,
track the subdirectories in a stack, and perform the recursive search
yourself, handling the possible exceptions along the way.