tags:

views:

180

answers:

2

Is there a version of fnmatch for Windows? I'm trying to have the same functionality (basically using *'s from the command line for the filename) in C without having to call FindFirst() etc.

Code is appreciated.

EDIT: I need to accept wild cards from the command line for filenames, for example *.txt and be able to open each .txt file.

As I said, I don't want to use if possible FindFirst, FindNext. Thanks

+2  A: 

PathMatchSpecEx would be roughly equivalent, though it takes arguments in the wrong order.

ephemient
great, this one works in a very similar way. thanks!
Jessica
A: 

I do my C development in Windows using the environment and GCC toolchain from Cygwin which provides fnmatch, among other POSIX features. You should be able to get the same functionality through MinGW as well.

bta