Is it possible to specify multiple file extension with wildcards in Windows?

For example, *.bmp finds all bitmaps. What if I want to find all *.bmp and *.png in one command? Is it possible?
I think it is *.bmp OR *.png

PS: I don't know what tags to use on the search stuff :D so I used code tags as it is somewhat like it...
¿do you really need OR?
Is this for FindFirstFile? Or for GetOpenFileName?

For GetOpenFileName, you can use multiples with a semicolon:

1
2
3
OPENFILENAMEW ofn;
// ...
ofn.lpstrFilter = L"Supported Image files\0*.bmp;*.png\0All Files\0*\0\0";


For FindFirstFile, I don't think there is a way. You'll have to just find all (*), and then manually filter.


EDIT: Oh crap I didn't realize this was in the lounge. I thought he was asking about WinAPI. Doh!
Last edited on
Actually it is for FindFirstFile. I asked here because I thought it was just a general question about using wildcards. But I suppose you're right and I'll have to manually filter the files.
Topic archived. No new replies allowed.