Pattern argument in Directory.GetFiles() method

  • Thread starter Thread starter Christoph Boget
  • Start date Start date
C

Christoph Boget

Are you only allowed to define one pattern? ie, "*.txt"? Or
can you define multiple patterns? ie, "*.txt; *.doc; *.xls"? If
you are allowed to do the latter, what is the syntax? I've tried
various seperators (;, :, etc) but none work and that leads me
to believe that this functionality isn't natively supported and that
I'd need to implement my own work around.

Can someone let me know if I'm missing something?

thnx,
Christoph
 
http://msdn.microsoft.com/library/d.../frlrfSystemIODirectoryClassGetFilesTopic.asp

According to the MSDN, only '*' and '?' are wild card specifiers, you have
to code it :(

Have a look at this:
http://perso.3ie.org/yannick.lejeun...-programmation-dotnet.html#108550433442793663

--
Guillaume BELMAS
Consultant 3IE (http://www.3ie.org)

| Are you only allowed to define one pattern? ie, "*.txt"? Or
| can you define multiple patterns? ie, "*.txt; *.doc; *.xls"? If
| you are allowed to do the latter, what is the syntax? I've tried
| various seperators (;, :, etc) but none work and that leads me
| to believe that this functionality isn't natively supported and that
| I'd need to implement my own work around.
|
| Can someone let me know if I'm missing something?
|
| thnx,
| Christoph
|
|
 
Back
Top