From: bpmurray*STUFFER*@socrates.cgl.ucsf.EDU (Bernard P. Murray, PhD) Newsgroups: comp.os.msdos.djgpp Subject: Re: is this right? Date: Wed, 30 Dec 1998 18:54:05 -0700 Organization: University of California, San Francisco Lines: 71 Message-ID: References: <19981229224534 DOT 7612 DOT rocketmail AT send105 DOT yahoomail DOT com> <76c008$1j6$1 AT lucille DOT cc DOT swin DOT edu DOT au> <368b2c95 DOT 1248268 AT news> NNTP-Posting-Host: macmac-2.ucsf.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <368b2c95 DOT 1248268 AT news>, fprintf AT iname DOT com wrote: > Jeremy, what does the %path% do, anyway? > > On 30 Dec 1998 01:35:04 GMT, 075557 AT bud DOT swin DOT edu DOT au (Tarragon Allen) > wrote: > > >Essidartha Emerald (essidartha AT yahoo DOT com) wrote: > >: IS THIS THE RIGHT WAY TO EDIT IT? > >: --------------------------------- > >: set DJGPP=C:\DJGPP\DJGPP.ENV > >: path=c:\ca_appsw;c:\java\bin;c:\djgpp\bin;%path% > > > > Yes. However, be careful using %path% in your path statement -- I > >never found it reliable (until I started using 4DOS). So, I would > >recommend defining your path explicitly. > > > > Jeremy W. Murphy > > - ratboy > aka stuarthall AT geocities DOT com Okay, I'll bite. My opinion on the "right way to do it" is; If your current AUTOEXEC.BAT has the line, path=c:\ca_appsw;c:\java\bin Then you change your AUTOEXEC.BAT as follows, path=c:\ca_appsw;c:\java\bin set DJGPP=C:\DJGPP\DJGPP.ENV path=c:\djgpp\bin;%path% In other words you *add* another PATH setting rather than messing with the original. The %path% is the environment variable that contains your original PATH setting (ie. c:\ca_appsw;c:\java\bin) so the second PATH command tells your operating system to start looking for commands; firstly in your DJGPP bin directory, and secondly in the directories that were in your original PATH (ie. next in c:\ca_appsw and then lastly in c:\java\bin). This method is the one recommended in the DJGPP FAQ in that you *add* the two simple lines to your AUTOEXEC.BAT file rather than messing with the existing PATH declaration. Implicit in this intruction is that the PATH setting with the djgpp\bin directory in it comes after any other PATH declarations. This sort of game is particularly useful when you are connected to a network and you inherit a skeleton path from the server that you then modify on your own machine. Also, if you want to see %VAR% being used in a flexible manner just have a quick look at your DJGPP.ENV file. In the example that you gave above (path=c:\ca_appsw;c:\java\bin;c:\djgpp\bin;%path%) the %path% variable will be empty as this is the first time that you are defining it. This formal declaration will certainly work but the djgpp\bin directory will be searched *after* the other two so any "inferior" commands with the same name as DJGPP versions (especially fc and mv) will be used instead of the DJGPP binaries. I hope that this helps and will be happy to be corrected if I made a mistake in the explanation (let's finish '98 off in the way I started). Bernard -- Bernard P. Murray, PhD Dept. Cell. Mol. Pharmacol., UCSF, San Francisco, USA