Article View: alt.msdos.programmer
Article #1216Re: DOS doesn't expands wildcard argument...!
From: gruch
Date: Sat, 20 Apr 1996 13:13
Date: Sat, 20 Apr 1996 13:13
28 lines
1489 bytes
1489 bytes
budlo@bud.com (Bud Lo) wrote: >hello... >i've written a C program and compiled both a Unix and DOS version, >the Unix version correctly expands its wildcard argument like *.jpg >into its constituent files while the DOS version do nothing... >Can anyone suggest solution to make it work in DOS... >(i know that the Unix's shell do the work of wildcard expansion >before passing them to my program, and observing this behaviors >in DOS, does it imply that command.com simply leave this task to >programmer???) >thanks a lot.. >Herman Yes and no Herman. COMMAND does not automatically expand wildcards before passing them to your program. But DOS does have two services you can to accomplish this task. They can be accessed through Int 21 functions 4Eh and 4Fh. Look in your compiler documentation first though- It probably contains a function like _dos_findfirst and _dos_findnext to make the job a little easier. If not you can find the information you need in "The new Peter Norton Programmers Guide to the IBM PC & PS/2" ISBN 1-55615-131-4. Enjoy! ~Gerry
Technical Details
Message-ID:
<4lansl$1vk@cobra.Minn.Net>Path:
arc1-ca.pugleaf.net!news.minn.net!newsReferences:
<3177b1d9.14121359@news.hk.linkage.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.minn.net!news From: gruch@minn.net Newsgroups: alt.msdos.programmer,comp.lang.c Subject: Re: DOS doesn't expands wildcard argument...! Date: Sat, 20 Apr 1996 13:13:17 GMT Organization: Minn Net Message-ID: <4lansl$1vk@cobra.Minn.Net> References: <3177b1d9.14121359@news.hk.linkage.net> NNTP-Posting-Host: dialup-198.minn.net X-Newsreader: Forte Free Agent 1.0.82