Sftp scripting

Dear All,

I have script that get the files from sFtp server to Unix server. The script is below.

 
-- Batch File (mybatch)
cd Output
get abc123.csv  in/abc123.csv
get def456.csv   in/def456.csv
get ghi789.csv   in/ghi789.csv
bye
-- Script File
sftp -b mybatch xyz@111.222.33.4  > ftp.log 2>&1

If the second file not found then the rest of the code is aborted. How can I ensure the code run completly?

Many Thanks.

check exit code. if this is 0 then it ran to success.

echo $?