By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,471 Members | 711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,471 IT Pros & Developers. It's quick & easy.

DirectoryInfo's GetFileInfo Search pattern question

P: n/a
e.g. c:\test

doc1.txt
doc1.pdf
doc2.txt
doc2.pdf
doc3.txt
doc4.pdf
doc5.txt
doc5.pdf

only doc1, doc and doc5 will be returned as has both .txt and .pdf files

how to implement? i'm not sure whether the DirectoryInfo's GetFileInfo's
seach pattern can do so or not?

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Mullin Yu" <mu*******@ctil.com> schrieb:
e.g. c:\test

doc1.txt
doc1.pdf
doc2.txt
doc2.pdf
doc3.txt
doc4.pdf
doc5.txt
doc5.pdf

only doc1, doc and doc5 will be returned as has both .txt and .pdf files

how to implement? i'm not sure whether the DirectoryInfo's GetFileInfo's
seach pattern can do so or not?


You'll have to call the method multiple times, each time with one of the
file patterns. Make sure that the result of the patterns is distinct so you
don't get the same file more than one time.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.