From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: *argv[] help! Date: Fri, 30 Jan 1998 18:30:54 -0500 Organization: Two pounds of chaos and a pinch of salt. Lines: 17 Message-ID: <34D262AE.64EB@cs.com> References: <6asscp$5c4$6 AT news DOT ox DOT ac DOT uk> NNTP-Posting-Host: ppp237.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk As a followup to this thread, I've written a couple of programs that accept wildcards on the command line, and specify some sort of "target" for an operation to be performed on these wildcards. It might seem like there's no way to tell, after expansion, which arguments are the sources and which is the target, but that's not true at all. If your program is of the form: "foo "; i.e., "copy *.c ../backup", then the last argument on the command line will always be the target, no matter how the source wildcard(s) were expanded. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com | | "Starting flamewars since 1993" | http://www.cs.com/fighteer/ | | *** NOTICE *** This .signature | ICQ UIN#: 7406319 | | is generated randomly. If you don't like it, sue my computer. | ---------------------------------------------------------------------