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
  • 45,951
  • 44
  • 147
  • 243

1 Answers1

2

You may checkout the following blog post.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928