Ancestors

Toot

Written by The FreeDOS Project on 2025-01-09 at 11:35

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

Descendants

Written by Pointing Device on 2025-01-09 at 11:59

@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

Written by Tim Chase on 2025-01-09 at 13:42

@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

Written by Thom Denholm on 2025-01-09 at 14:39

@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

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113798187848308776
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
241.680755 milliseconds
Gemini-to-HTML Time
0.852987 milliseconds

This content has been proxied by September (ba2dc).