title: Uploading files to an FTP server via a batch file
body: <p>I need to upload a set of <code>.txt</code> files to an FTP server using a <code>.bat</code> file. So far, I've managed to connect to the FTP server, including the correct directory that I need to put the file into and then disconnect. However, it isn't uploading the files.</p>
  <p>In my <code>.bat</code> file, I've got this line to start the process</p>
  <pre><code>ftp -s:ftp.txt
  </code></pre>
  <p>Then, in <code>ftp.txt</code>, I've got</p>
  <pre><code>open my.ip.address
  myUserName
  myPassword
  binary
  cd myDir
  cd myDir
  put C:\MyFolder\*
  quit
  </code></pre>
  <p>It goes to the correct directory when I run the batch file, the output being</p>
  <blockquote>
  <p>OK. Current directory is /myDir/MyFolder</p>
  <p>ftp&gt; put C:\MyFolder*</p>
  <p>Error opening local file C:\MyFolder..</p>
  <p>ftp&gt; quit</p>
  <p>Goodbye. You uploaded and downloaded 0 kbytes.</p>
  </blockquote>
  <p>Why is it erroring when trying to upload all files from <code>C:\MyFolder\</code>? Is there another way to upload all of the files from a folder?</p>