Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!mit-eddie!genrad!decvax!ima!esegue!johnl From: johnl@esegue.segue.boston.ma.us (John R. Levine) Newsgroups: comp.sys.ibm.pc Subject: Re: What interprets *.* Summary: programs ask DOS to do it Message-ID: <1989Sep20.123235.4778@esegue.segue.boston.ma.us> Date: 20 Sep 89 12:32:35 GMT References: <635.25170D1F@mudos.ann-arbor.mi.us> Reply-To: johnl@esegue.segue.boston.ma.us (John R. Levine) Organization: Segue Software, Cambridge MA Lines: 27 In article <635.25170D1F@mudos.ann-arbor.mi.us> mju@mudos.ann-arbor.mi.us (Marc Unangst) writes: >In article <32164@ames.arc.nasa.gov>, gahooten@titan (Gregory A. Hooten) writes: > >In Unix, it is the shell that interprets the character *, what in > >DOS will do the same thing? ... > >Each program has to do it on its own. This is actually much worse >than COMMAND.COM doing it for you, because then you have differing >interpretations of things like "*89.*" (does it mean "*.*", like >COMMAND.COM thinks it does, or "any file with `89' in the name", >like some other utilities do?), ... It's not quite that bad. DOS has a system calls that take a wild card name and return the actual file names that match the pattern. The command processor expands wild cards that way, and most other programs that expand wild cards use the same calls and so they get results that are consistent. Unfortunately, DOS's idea of star matching is pretty poor. Some programs reimplement star matching themselves, usually to make it more like the way Unix does it, which is certainly better but since it's inconsistent with everything else it's confusing. Also, since DOS file names are more complicated that Unix names, a fully general star expander is very hard to write. I've never seen one that could handle *:foo and look for foo on every drive. -- John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 492 3869 johnl@esegue.segue.boston.ma.us, {ima|lotus}!esegue!johnl, Levine@YALE.edu Massachusetts has 64 licensed drivers who are over 100 years old. -The Globe