title: Retrieve data from COM port using a batch file
body: <p>I'm trying to automatically retrieve data from a COM port using a batch file.</p>
  
  <p>I'm able to configure the com port and to send the command in other to ask my device for the info.</p>
  
  <p>The problem is that I'm not able to capture the data that the device sends. I've tried with RealTerm and the device is working and sends the info back to the pc, but I really need the batch file to do it automatically, here is the code:</p>
  
  <pre><code>echo off
  
  MODE COMxx ...
  
  COPY retrievecommand.txt \\\\.\COMxx:
  
  COPY \\\\.\COMxx: data.txt
  </code></pre>
  
  <p>Any suggestions?</p>