From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie Coder Seeks Helful Advice ;) Date: Fri, 3 Oct 1997 18:39:24 +0100 Organization: wot? me? Distribution: world Message-ID: <5UlkEGAM3SN0EwHJ@foobar.co.uk> References: <3433A56C DOT 14F9 AT mailexcite DOT com> <01bccf5b$e0462c00$703163c3 AT mrb-comp> <3434015C DOT 349A AT nortel DOT ca> <611a3i$2v6 AT dfw-ixnews10 DOT ix DOT netcom DOT com> Reply-To: Paul Shirley NNTP-Posting-Host: chocolat.foobar.co.uk Mime-Version: 1.0 Lines: 17 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <611a3i$2v6 AT dfw-ixnews10 DOT ix DOT netcom DOT com>, firewind writes >Inside a batch file (and ONLY inside a batch file; this does not -ever- work >at the command line) anything beginning with % is interpreted specially. As >you probably know, %1 through %9 are the arguments, %0 is a sort of argv[0]. Wrapping an environment variable (example: %PATH%) works under a Win95 dos command line. I would be surprised if it failed under raw dos (but I certainly don't intend rebooting just to find out) So 'set C_INCLUDE_PATH=mynewpath;%C_INCLUDE_PATH%' correctly prepends mynewpath to C_INCLUDE_PATH from the commandline. The %0 form of course is unlikely to work outside a batch file ;) --- Paul Shirley: my email address is 'obvious'ly anti-spammed