JSI Tip 6533. How can I set multiple environment variables to the same value using a single command?

In tip 6532, I used the following command to un-define 3 environment variables:

for %%x in (user cnt line) do set %%x=

If you need to set a number of environment variables to numeric 0, you could:

for %%x in (var1 var2 var3 var4) do set /a %%x=0

If you need to set a number of environment variables to NO, you could:

for %%x in (var1 var2 var3 var4) do set %%x=NO



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish