How to set/use an empty string value in a variable in Windows XP CMD.EXE command-line?

view full story

http://superuser.com – Using SET to set an empty value to a variable works nicely in a Windows XP .CMD script. However, the same SET command behaves differently in the same CMD interpreter when used directly from command-line: Trying to test it in a CMD.EXE command-line: C:\>set Q= C:\>echo %Q% %Q% C:\>echo "%Q%" "%Q%" C:\>set Q=/Q C:\>echo %Q% /Q C:\>echo "%Q%" "/Q" Trying to test it with a .CMD script like this: set Q= echo %Q% echo "%Q%" set Q=/Q echo %Q% echo "%Q%" Running it: C:\>c.cmd C:\>set Q= C:\>echo ECHO is on. C:\>echo "" "" C:\>set Q=/Q C:\>echo /Q / (HowTos)