title: Read and Write HTML file in Batch Script
body: <p>I'll confess that I was never all that good at writing DOS Batch scripts beyond basic stuff.
  I've had need to write a script to read an HTML template file and create a new file from it... Now I can read the file into a variable using:</p>
  
  <pre><code>for /f "delims=" %%x in (template.html) do set fileData=%%x
  </code></pre>
  
  <p>and I can echo the variable out to see that the html data is in there.
  But when I try to write it out using:</p>
  
  <pre><code>echo %fileData%&gt;test2.html
  </code></pre>
  
  <p>I get an error:</p>
  
  <p><strong>The system cannot find the file specified.</strong></p>
  
  <p>I'm not sure if it has anything to do with the variable containing html tags that are confusing the output to file?</p>