title: Batch FIle and Winscp to download files from SFTP Server
body: <p>I want to run a batch script to do the following :</p>
  
  <p>Using WinScp:</p>
  
  <ol>
  <li>connect to sftp server </li>
  <li>change local directory</li>
  <li>download all files</li>
  </ol>
  
  <p>connecting with :</p>
  
  <p>winscp.com sftp://HOST.com:2222/download/ -privatekey="C:\SFTP keys\PRIVATE-KEY.ppk"</p>
  
  <p>allows me to use the following commands to successfully achieve this :</p>
  
  <ul>
  <li>lcd "c:\DIRECTORY"</li>
  <li>get *.*</li>
  </ul>
  
  <p>how do I add the above commands to the command line command so that I can automate it from a batch file?</p>
  
  <p>Thanks</p>