title: FTP batch script hangs at ftp> prompt
body: <p>I'm trying to execute the following batch script to copy file from ftp to local directory.  However, I'm only able to login to the ftp but can't get the rest (bold code) of the script to execute.  The script hangs at ftp> prompt.</p>
  
  <pre><code>ftp -i -n -v ftp.domain.com
  quote 'User'
  quote 'Password'
  **cd /iatest
  mget * C:\local\directory
  pause**
  </code></pre>
  
  <p>Can someone please help?  Thank you.</p>
  
  <p>Got it to work. A couple of items for newbies like me: You need to two scripts to execute the task as following:</p>
  
  <p>Script 1 (scriptname.bat): To call the .bat script with your code to execute.</p>
  
  <pre><code>ftp -i -n -s:yourscript.bat
  </code></pre>
  
  <p>Script 2: Actual code you want to execute which in my case is to copy files from ftp to specific local directory.</p>
  
  <pre><code>open ftp.domain.com
  user username
  password
  cd /ftpDirectoryYouNeedToCopyFrom
  lcd C:\DirectoryYouWantToCopyInto
  mget * 
  bye
  </code></pre>
  
  <p>Here is a good reference: 
  <a href="http://www.youtube.com/watch?v=2YJMcns0ILk" rel="nofollow">http://www.youtube.com/watch?v=2YJMcns0ILk</a></p>