In Win API is there a function that uses wildcards??
I want to check the file extension in a path... (e.g. c:\windows\code.c)
For instance:
A function that would help me match this...
c:\windows\*.c
or
*.c
Thanks
In Win API is there a function that uses wildcards??
I want to check the file extension in a path... (e.g. c:\windows\code.c)
For instance:
A function that would help me match this...
c:\windows\*.c
or
*.c
Thanks
Sorry Zen, I meant matching strings...
Lets say lpCmdLine ...
Happens to be c:\windows\something.txt
I would like to match that file path, using wild cards, like this....
*.txt
or
C:\windows\*.txt
Should have been more specific
That's exactly what FindFirstFile() and FindNextFile() do.
One more try...I was still, apparently, too vague
Let me just tell you what I am trying to do.
In WinMain I want to check lpCmdLine with a function, which uses wildcards, to see if lpCmdLine (lpszArgs in my case) includes e.g. the .c extension, then have the application take a certain course of action. The function would, I suppose, use wildcards like this *.txt or c:\windows\*.txt when checking lpCmdLine.
in the Win32 help file it says, "The FindFirstFile function searches a directory for a file whose name matches the specified filename."
Sorry about that. I should of explained it this way before.
Use "?"
ie .\???????????.exe
Last edited by novacain; 11-19-2001 at 12:18 AM.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill