When quoting start to get ugly I resort to a small UDF to tidy it up and keep me on the straight and narrow.

The tiny QuoteMe() UDF just wraps a string in double quotes or the optional $q string if you pass it.

 Code:
$=SetOption("WrapAtEOL","ON")
$=SetOption("NoVarsInStrings","ON")

$SQ="'"
Function QuoteMe($s,Optional $q) $QuoteMe=Iif($q,$q+$s+$q,'"'+$s+'"') EndFunction

$sCMD=QuoteMe(%COMSPEC%)
	+" /C FOR /F "+QuoteMe("tokens=*")+" %a in "
	+"("
	+   QuoteMe("DIR /ogn /ad /b "+QuoteMe("%SYSTEMDRIVE%\Documents and Settings"),$SQ)
	+ ") do ("
	+   "XCOPY /Q /Y "
	+   QuoteMe("<SERVER LOCATION>\normal.dotm")
	+   " "
	+   QuoteMe("C:\Documents and Settings\%a\Application Data\Microsoft\Templates\")
 	+   " > nul 2> nul"
	+ ")"

"Command to execute:"+@CRLF
$sCMD+@CRLF