SET command syntax

  • Thread starter Thread starter obones
  • Start date Start date
O

obones

Hi all

Can anyone tell me the result of running those three lines in an MS-DOS
window?

set MYVAR="hello"
set MYVAR=%MYVAR:"=%
echo %MYVAR%

Under windows XP, it returns hello without the double quotes, but I want
to be sure this would also work under other versions of Windows, ideally
all.
Thanks for your help
 
obones said:
Hi all

Can anyone tell me the result of running those three lines in an MS-DOS
window?

set MYVAR="hello"
set MYVAR=%MYVAR:"=%
echo %MYVAR%

Under windows XP, it returns hello without the double quotes, but I want
to be sure this would also work under other versions of Windows, ideally
all.
Thanks for your help

It will only work under NT4.0, Win2000, and WinXP; it does not work in
Win3x, Win9x, or WinME. There is no "MS-DOS" in any version of NT.
 
Back
Top