From: George Foot Newsgroups: comp.os.msdos.djgpp Subject: Re: *argv[] help! Date: 29 Jan 1998 06:58:46 GMT Organization: Oxford University, England Lines: 26 Message-ID: <6ap9b6$7t8$4@news.ox.ac.uk> References: <34D00884 DOT CE5 AT discover DOT net> NNTP-Posting-Host: sable.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Wed, 28 Jan 1998 20:41:40 -0800 in comp.os.msdos.djgpp Ian Perez wrote: : If argv[1] has wildcards like ? and *, argv[1] will be the first : filename matching that criteria. How can I get it so argv[1] will : actually BE what the second argument is?? DJGPP performs command-line globbing automatically, like Unix shells do. This means that if you give a wildcard on the command line it will be expanded into the list of files matching the wildcard -- so in your case argv[1] would be the first, argv[2] the second, etc. You can disable this in one of two ways: a) Quote the parameter, for example: foo "*.exe" This is something the user must do, though, not the programmer. b) Override the standard globbing routines djgpp provides with ones that don't do anything. For more information on the second of these please see the include file `crt0.h' in your `include' directory, and the FAQ section 16.2. Sections 16.1 and 16.3 are also relevant here. -- george DOT foot AT merton DOT oxford DOT ac DOT uk