Batch file to copy local folder to FTP server fails with "cannot open file" on "put *"
<p>I found some posts on similar issues but I did not make my problem to work.
I want to use Windows Task on Windows Server 2012 to copy the content of some folders to back them up on a FTP server.</p>

<p>I created a <code>filebakup.bat</code> and entered these lines</p>

<pre><code>@echo off
echo user myusername&gt; ftpcmd.dat
echo mypassword&gt;&gt; ftpcmd.dat
echo bin&gt;&gt; ftpcmd.dat
echo lcd /D "G:\Navi_Touren\Tour_2015\"&gt;&gt; ftpcmd.dat   *the local dir with many files to transfer
echo cd /backups/Tour_2015&gt;&gt; ftpcmd.dat  *the Destination Folder on ftp  
echo put *&gt;&gt; ftpcmd.dat
echo quit&gt;&gt; ftpcmd.dat
ftp -n -s:ftpcmd.dat myFTPserver.com
</code></pre>

<p>It does not work, it says "cannot open file" or similar error message.</p>

<p>I can only make it with one file </p>

<pre><code>echo put "G:\Navi_Touren\Tour_2015\myfile.txt"  "/backups/Navi Touren/myfile.txt"&gt;&gt; ftpcmd.dat
</code></pre>

<p>But how to transfer all files in a certain directory?</p>

<p>Thanks
Michael</p>