I need to upload a set of .txt
files to an FTP server using a .bat
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.
In my .bat
file, I've got this line to start the process
ftp -s:ftp.txt
Then, in ftp.txt
, I've got
open my.ip.address
myUserName
myPassword
binary
cd myDir
cd myDir
put C:\MyFolder\*
quit
It goes to the correct directory when I run the batch file, the output being
OK. Current directory is /myDir/MyFolder
ftp> put C:\MyFolder*
Error opening local file C:\MyFolder..
ftp> quit
Goodbye. You uploaded and downloaded 0 kbytes.
Why is it erroring when trying to upload all files from C:\MyFolder\
? Is there another way to upload all of the files from a folder?