title: How do you escape a double-colon in a DOS batch file?
body: <p>I need to run a command in a DOS batch file that contains a double colon AND set the output to a variable.  Like this</p>
  
  <pre><code>set /a TDR = C:\InCharge\CONSOLE\smarts\bin\dmctl -s SSA-SAM invoke SM_System::SM-System nameToAddr %SM_OBJ_InstanceName%
  </code></pre>
  
  <p>I keep getting "Missing operator".  I assume that is due to those double-colons. How do I escape these?  I tried back-slashes but that didn't work.  I've tried putting the whole command in double-quotes and that also didn't work.</p>
  
  <p>I can run the command by itself, ie without the "set /a TDR" and the output is correct. But I need to use that output as the value of a variable hence the "set /a"</p>
  
  <p>Normal output for dmctl is this</p>
  
  <pre><code>{ "10.28.112.74" }
  </code></pre>
  
  <p>I am using dmctl to get the ip address for the hostname.  I figured once I got the output I could strip off the brackets and quotations, but I haven't figured out how to grab the output.</p>
  
  <p>Thank you in advance.</p>