title: windows cmd: read COM-port output to FINDSTR for output filtering
body: <p>I'm trying to display filtered data that I'm reading from COM.</p>
  
  <p>I'm displaying the information as:</p>
  
  <p><code>
  COPY COM6 CON
  </code>
  and this works fine for displaying ALL data.</p>
  
  <p>But I want to display ONLY the data starting with "Date" and "Refractive"
  This is what I'd come up with, but this doesn't word:</p>
  
  <p><code>
  ECHO COM6 | findstr /R "^Date.* ^Refractive.*" | CON
  </code></p>
  
  <p>Is there a way this CAN work?</p>
  
  <p>#1~~~~~~~~~~~~~</p>
  
  <p>addendum</p>
  
  <p>In case you're curious how this works, or for development-purposes, I'm using this to create virtual COM-ports, linked with a null-modem cable:
  The homepage for com0com project is <a href="http://com0com.sourceforge.net/" rel="nofollow noreferrer">http://com0com.sourceforge.net/</a>.</p>
  
  <p>It creates 2 COM-ports, e.g. COM5 &amp; COM6, as if they're directly wired to eachother. So message sent to COM5 will be received by COM6 and the other way around.
  So by opening 2 command-prompts, in one I read a txt-file and send it to COM5, the other listens to COM6</p>
  
  <p><code>cmd1: type D:\test.txt &gt; COM5</code></p>
  
  <p><code>cmd2: TYPE COM8 CON | findstr /R "^Date.* ^Refractive.*"</code></p>
  
  <p>Voila</p>
  
  <p>#2~~~~~~~~~~~~~</p>
  
  <p>This works too, probably a better way to write it.
  Thanks @Stephan
  <code>
  TYPE COM6 | findstr /R "^Date.* ^Refractive.*" &gt; CON
  </code></p>