One option shoud be ..
After copying files to remote server, just before quit the connection, give a ls and capture it in a shell variable.Then, verify the files list from the variable...
ie,
Code:
var=$(ftp xxxx.this is IP address of remote machine.com << EOFFile
......
...
lcd
ls
quit
EOFfile
)
echo $var