Windows user defined environment variable names can contain any character except =
.
Special characters can be included by escaping them. A simpler metho
I do it by defining a flag as TRUE if needed...
rem /* sample code */
set VAR_SET=
if set VAR_SET=TRUE&set VAR=this data has spaces
rem /* test for VAR_SET using 'if defined' */
if defined VAR_SET (
rem /* do something with the other data in the variable %VAR% */
)
rem /* clear the flag */
set VAR_SET=