Possible Duplicate:
C# file exists by file name pattern
let’s say I have a folder called documents, the documents folder consisting of pdfs, videos, texts, photos etc… I would like to do something with only .doc extensions. The only thing that I can think is actually creating a process that will use cmd.exe and use dir command in the directory, however I am looking for something more efficient. Any recommendations?
Perhaps you’re referring to the DirectoryInfo.GetFiles method: