Page 1 of 1

Problem with batch ftp upload. uploaded images dont work!

Posted: 26 Aug 2009 15:38
by xd3rek
i am trying to upload a image via batch file using ftp...

everytime i upload a jpeg or png image using batch file the image would not display as if the file was damaged or something. . .

however i could upload the same image via my ftp client and the image would work fine...

BUT when i upload a .txt file using the same batch file the file displayed normally and worked...

WHAT IS WRONG IS THERE A FIX?

here is the code for my batch file
upload.bat

Code: Select all

@echo off
ftp -s:commands.txt
pause
exit


and here is the code for commands.txt

Code: Select all

open ftp.myftpserver.com
myftpusername
myftppassword
cd Bittorrent
put shot.jpg
quit

Posted: 26 Aug 2009 21:31
by DccD
Try putting binary just before the put command:

Code: Select all

open ftp.myftpserver.com
myftpusername
myftppassword
cd Bittorrent
binary
put shot.jpg
quit