Path: utzoo!yunexus!gen1!bob From: bob@gen1.UUCP (Robert Kamins) Newsgroups: comp.lang.c Subject: Wildcard expansion in Turbo C Keywords: glob, Turbo C Message-ID: <329@gen1.UUCP> Date: 11 Feb 88 20:25:08 GMT Article-I.D.: gen1.329 Posted: Thu Feb 11 15:25:08 1988 References: <1282@nmtsun.nmt.edu> Reply-To: bob@gen1.UUCP (Bob Kamins) Organization: gen1 - York University, Petrie Bldg, Downsview, Ontario CANADA Lines: 21 In <1282@nmtsun.nmt.edu>, greg@nmtsun.nmt.edu (Greg Lindhorst) writes: > I have a stupid question to ask. How can one get Turbo C to expand > wild carded arguments on the command line? > > I.E. Translate something like: "doitto *.c" > into something like: "doitto first_file.c second_file.c ..." The process of which you speak is called "globbing" and is normally handled in Unix by the shell. In MS-DOS-land, you get to do it all by yourself. I have a "glob" routine that does an MS-DOS wild-card expansion. The trouble with MS-DOS expansion is that you can't easily glob stuff like "*c" and expect to get files with names like "ab.c". What you WILL get is "abc.", "xyz." and in fact anything without an extension. Oh well, my glob is posted to "comp.binaries.ibm.pc" if you want it. You can "#include" it or compile it and add the object to your libraries. Bob Kamins.