Problem with batch ftp upload. uploaded images dont work!

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
xd3rek
Posts: 1
Joined: 26 Aug 2009 15:28

Problem with batch ftp upload. uploaded images dont work!

#1 Post by xd3rek » 26 Aug 2009 15:38

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

DccD
Posts: 23
Joined: 26 Aug 2009 19:34

#2 Post by DccD » 26 Aug 2009 21:31

Try putting binary just before the put command:

Code: Select all

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

Post Reply