changing PATH with bracket
- From: "Kok Yong Lee" <lkoky@xxxxxxxxxxx>
- Date: Tue, 6 Feb 2007 11:26:13 -0000
Hi there,
I have a batch file need to modify the env path according to a keyword
supplied by user during run time to change the PATH; e.g. mybat debug, mybat
optimize.
However on certain machine, especially x64 machine, the bracket in the PATH
has caused me a lot of grief.
for example in the code snippet below, if I run it it always error out as
"\fred was unexpected at this time.".
Just wodered are there any ways to get around the bracket issue?
thanks.
snippet
----------------
set path=c:\program files(x68)\fred;%PATH%
if /i .%1 == .optimize (
set path=optimize;%PATH%
)
.
- Follow-Ups:
- Re: changing PATH with bracket
- From: foxidrive
- Re: changing PATH with bracket
- Prev by Date: Re: How to know what errorlevels a console applikation sets
- Next by Date: Re: changing PATH with bracket
- Previous by thread: How to know what errorlevels a console applikation sets
- Next by thread: Re: changing PATH with bracket
- Index(es):
Loading