deleting variables set with SET?

  • Thread starter Thread starter yawnmoth
  • Start date Start date
Y

yawnmoth

Say I ran the following command:

set var="blah"

How can I delete "var"? ie. how can I make it so that...

echo %var%

....outputs %var% and not blah?
 
When the cmd.exe session dies so does the variable.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Say I ran the following command:
|
| set var="blah"
|
| How can I delete "var"? ie. how can I make it so that...
|
| echo %var%
|
| ...outputs %var% and not blah?
|
 
yawnmoth said:
Say I ran the following command:

set var="blah"

How can I delete "var"? ie. how can I make it so that...

echo %var%

...outputs %var% and not blah?

set var="" to empty the var again. if you want to echo something with %
in it, then you need to escape them.. forget how look it up on google.

Flamer.
 
set var="" to empty the var again. if you want to echo something with %
in it, then you need to escape them.. forget how look it up on google.

Flamer.

Your command will set var to two double quotes. To set it to
nothing, just type this:

set var=

Make sure not to have a trailing space after the equal sign.
 
Back
Top