Search code examples
batch-fileftpcmdftp-client

cmd ftp mput - jpeg files differs from original file


currently im executing this batch for ftp -s:

open 192.1.2.3
USER
PASSWORD
cd "folder"
lcd "c:\folder"
prompt
mkdir 20140730
cd "20140730"
mput *.jpeg
quit

During testing I was trying to mput like 10 files and everything seems fine. Now im transfering aprox. 1400 files with total size 700MB and my problem is that uploaded file is different then the original one. JPEG seems to be corrupted, on some image is lighter part another part is dark, or there are some coloured lines or parts on image... Is there way check if files moved by mput are same with source files? All files i have checked are affected.


Solution

  • Issue the binary keyword in the script before transferring the files.

    prompt
    binary
    

    The binary keyword stops files being truncated at the first EOF character, which is the default behaviour in text transfer mode.