title: windows batch file scripting - keep formatting in html
body: <p>I'm currently trying to write a simple batch script that will run a series of windows commands and output them nicely into a single html file.</p>
  
  <p>the command im running for example, is <code>netsh firewall show config</code>, Looks something like this:</p>
  
  <pre><code>Domain profile configuration (current):
  -------------------------------------------------------------------
  Operational mode                  = Enable
  Exception mode                    = Enable
  Multicast/broadcast response mode = Enable
  Notification mode                 = Enable
  Service configuration for Domain profile:
  Mode     Customized  Name
  </code></pre>
  
  <p>Notice the nice spacing used that makes it easy to see?</p>
  
  <p>I'm trying to keep that in the HTML file that i create. So far, i have a simple batch script as follows:</p>
  
  <pre><code>@echo off
  
  echo ^&lt;font face="courier new" size="2"^&gt;^ &gt;&gt;index.html
  netsh firewall show config &gt;&gt; netsh
  type netsh &gt;&gt;index.html
  </code></pre>
  
  <p>When that spools to an index.html file, the resultant output looks something like this:</p>
  
  <pre><code>Domain profile configuration (current): -----------------------------------------------       
   -------------------- Operational mode = Enable Exception mode = Enable
   Multicast/broadcast     response mode = Enable Notification mode = Enable Service
   configuration for Domain profile: Mode Customized Name ------------------------------
  ------------------------------------ Enable No File and Printer Sharing Allowed\
  programs configuration for Domain profile: Mode Traffic
  </code></pre>
  
  <p>So does anyone know how i can output the command in a nice way, such that the formatting is kept? Its really just a bunch of spaces and breaks.</p>
  
  <p>Appreciate your help in advance!</p>