1

Possible Duplicate:
GetFiles with multiple extentions

How can I specify multiple extensions for the System.IO.Directory.GetFiles method?

I have tried.

string[] files = System.IO.Directory.GetFiles(path, "*.jpg *.png");

and

string[] files = System.IO.Directory.GetFiles(path, "*.jpg, *.png");

to no success.

Is this even possible?

Community
  • 1
  • 1
Maxim Gershkovich
  • 43,966
  • 43
  • 139
  • 233

1 Answers1

2

You may checkout the following blog post.

Darin Dimitrov
  • 994,864
  • 265
  • 3,241
  • 2,902