title: Batch For /F Syntax with %time%
body: <p>How do I accomplish this:</p>
  
  <pre><code>for /f "tokens=1-4 delims=: " %%a in ('%time%') do set XTime=%%a.%%b.%%c.%%d
  </code></pre>
  
  <p>I'm trying to get the contents of %time% e.g., 16:25:15.65 into 16.25.15.65.</p>
  
  <p>Running the command above gives me:</p>
  
  <blockquote>
    <p>The filename, directory name, or
    volume label syntax is incorrect.</p>
  </blockquote>
  
  <p>(If it matters I'm on Windows XP)</p>