Files and wildcards
I want to make a encryption program that will accept directories and wildcards on the command line, such as: encrypt /home/* or encrypt /home/???.jpg. If this is platform specific, I'm using linux. What headers and functions can I use to locate a match? Algorithm would be something like: move to directory specified, get first filename, if it's a match call encrypt function, get next filename, repeat.
In Linux, wildcard expansion is usually performed by the shell (unless you've set the noglob option).
All your program sees is a rather large value of argc and a corresponding number of argv strings.
Well, that's good news. Very good news. Wonder if my code will be portable to Windows, though. Guess the only way is to write it and try it out. Thanks for the response.
Modern compilers which expect cmd.exe to be the shell will probably expand wildcards (or can be made to at least).
Fossils on the other hand which only know about command.com (with it's 120+ char limit on total command line length) usually defaulted to no expansion IIRC (but could be made to).