title: Writing script to perform a series of commands over serial connection with PuTTY
body: <p>I have an RFID reader that I need to download data from periodically via a serial port connection (serial to USB). I have been using PuTTY to connect to the reader. I saved a session in PuTTY with all of the correct parameters for the reader and named it &quot;test&quot;.  I also used <em>&quot;All session output&quot;</em> under <em>Logging</em> so that the output will be stored in a file. I access the session via the Windows 10 command line like this:</p>
  <pre><code>putty.exe -load &quot;test&quot;
  </code></pre>
  <p>and the terminal appears just like it would if I went though the GUI. I then have a series of commands that I would like to run in the PuTTY terminal which provides the output data I need. For example lets say the commands I need to run are:</p>
  <pre><code>DT
  UH
  SS
  TF
  </code></pre>
  <p>I would like to automate this process somehow, so that every time I connect to the reader the same commands are run. Can a script be written to do this in PuTTY or can these commands be sent to PuTTY from the command line? Could someone demonstrate how to do this?</p>