is there a way to check in a .bat file if a certain environemnt variable
exists ?
if exists %myvar% echo yes
does not work.
Bye
Andreas
Depends on the OS version you are using.
Since you are posting from XP,
if defined varname ...
is probably best, although
if not "%varname%"=="" ...
should work for DOS/9x
NT+ questions are better placed in alt.msdos.batch.nt as DOS/9x and NT
methods differ greatly.
>is there a way to check in a .bat file if a certain environemnt variable
>exists ?
>
>if exists %myvar% echo yes
if N%myvar%==N echo no
You work out the other way around :-)
--
Kind regards,
Gerard Bok