I think your code will fail with an exception if you lack permission to open a file
.
Compare it with the code here: http://bgrep.codeplex.com/releases/view/36186
That latter code supports
- regular expression search and
- filters for file extensions
-- things you should probably consider.