Unix shells have globbing where wildcards on the command line get expanded into filenames. Your program just gets a list of files.
DOS is a much simpler operating system and does not do globbing, each program has to interpret wildcards on its own.
The DOS kernel provides the findfirst & findnext functions to do this. Here's how to use them:
https://allthingsopen.org/articles/findfirst-findnext-functions-expand-wildcards-filenames
=> More informations about this toot | More toots from freedosproject@fosstodon.org
@freedosproject I assume these wrappers also change the position of the default Disk Transfer Area to point at the specified buffer since the DOS API just (re)uses it?
In a way, DOS does even more here since the standard Unix kernel interface only provides reading inode/name entries from a directory; filtering them has to be done by the shell (possibly using extra stat() calls when filtering by attributes) or standard library functions such as fnmatch().
=> More informations about this toot | More toots from pointingdevice@restless.systems
@freedosproject The downside to having each program do their own globbing was that DOS programs behaved inconsistently. Some would process globs, some wouldn't; some supported quoting, some didn't; some used single-quotes others used double-quotes; some had quoted-quote issues. Some handled backslash escaping; variable-expansion was unpredictable; etc. I can't say I miss those aspects of things.
=> More informations about this toot | More toots from gumnos@bsd.cafe
@freedosproject Batch commands could be used to split some wildcards into individual files. I agree it wasn't as good as the Unix shell though.
=> More informations about this toot | More toots from ThomDenholm@awscommunity.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini