Article View: comp.sys.ibm.pc.misc
Article #6965Re: Adding to PATH
From: cctr132
Date: Sun, 20 Jan 1991 21:40
Date: Sun, 20 Jan 1991 21:40
29 lines
1572 bytes
1572 bytes
In article <1991Jan19.174019.20332@mccc.edu>, pjh@mccc.edu (Pete Holsberg)
writes:
> I would like to be able to either add to the default PATH or replace it
> (with the ability to restore it) via a BAT file, but can't figure out
> the syntax. The following doesn't work:
> PATH=%PATH;\added\directory\path
>
> If I could do that, I suppose I could also do
> OLDPATH=%PATH
> PATH=\desired\path\for\the\following\application
> invoke_application
> PATH=%OLDPATH
I thought you had to *surround* the environment var's name with percent
signs (%) for this kind of thing to work. Try:
PATH=%PATH%;\added\directory\path
I'm sure it's in the DOS Manual, but you probably missed it because it's
in the Batch Processing chapter, 8-) (probably - not all OEM DOSes are the
same).
But seriously, this was new with DOS 3.3 (or 3.2?) and won't work with
earlier versions.
---------------------------------------------------------------------------
Nick FitzGerald, PC Applications Consultant, CSC, Uni of Canterbury, N.Z.
Internet: n.fitzgerald@csc.canterbury.ac.nz Phone: (64)(3) 642-337
Technical Details
Message-ID:
<1991Jan21.101833.10204@csc.canterbury.ac.nz>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!comp.vuw.ac.nz!csc.canterbury.ac.nz!cctr132References:
<1991Jan19.174019.20332@mccc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!comp.vuw.ac.nz!csc.canterbury.ac.nz!cctr132 From: cctr132@csc.canterbury.ac.nz Newsgroups: comp.sys.ibm.pc.misc Subject: Re: Adding to PATH Message-ID: <1991Jan21.101833.10204@csc.canterbury.ac.nz> Date: 20 Jan 91 21:40:58 GMT References: <1991Jan19.174019.20332@mccc.edu> Organization: University of Canterbury, Christchurch, New Zealand Lines: 29