title: Automating telnet process with batch file
body: <p>Greetings stack community, I'm looking for a way to automate when I need to telnet.</p>
  <p>This is the flow that I go through when I telnet:</p>
  <p>-I open cmd and I telnet:
  Z:&gt;telnet 10.01.02.12 300</p>
  <p>-When I telnet to every IP the command propmt will ask for my user, once I input my user I need to press enter.</p>
  <p><em>cmd screen clears</em></p>
  <p>USER: <em>I type my user</em></p>
  <p>-Then cmd will ask for my password, then I enter the password and press enter.</p>
  <p>PASSWORD: <em>I type my password</em></p>
  <p>-Once the password has been accepted, I'm required to enter 1 and press enter.</p>
  <p>User &amp; Password have been accepted, please enter 1:</p>
  <p><em>I enter 1</em></p>
  <p>Connection has been established.</p>
  <p>Z:\</p>
  <p>So I'm creating a .bat file which I can use to automate this, is there a way that I can pass the arguments of username, password, and the input of 1. ?</p>
  <p>These is what I have so far in the .bat</p>
  <pre><code>@ECHO-OFF
  ECHO Performing telnets
  ECHO connecting to 10.01.02.12
  telnet 10.01.02.12 300
  ECHO connecting to 10.02.06.34
  telnet 10.02.06.34 300
  ECHO You have telnet to above IPs successfully.
  PAUSE
  </code></pre>