title: Need to execute FTP commands from batch script
body: <blockquote>
    <p>Need to write batch script which copies file from FTP to local drive</p>
  </blockquote>
  
  <p>I'm trying to achieve this using <code>cmd</code> command prompt </p>
  
  <p>inside batch file</p>
  
  <p>please help me or paste any thread. </p>
  
  <p>I found the answer thanks a lot but,</p>
  
  <p>I need to use 2files <code>script.txt</code> and <code>batch.bat</code></p>
  
  <p>which contains script.txt code:</p>
  
  <pre><code>open ftp.server.com
  username
  password
  cd folderpath/newfolder
  get file1.xml
  close
  bye
  </code></pre>
  
  <p>and batch.bat code</p>
  
  <pre><code>ftp -v -i -s:script.txt
  echo done!
  </code></pre>
  
  <blockquote>
    <p>But How can i do it using only <code>.bat</code> file so that I need only 1 file not 2 files</p>
  </blockquote>