ftp checking

I have a script to use ftp to transfer file from local server to remote server ( the command is put ) regularly , if I want to log what files are successful / unsuccessful transferred , and then re-transer these unsuccesful files , can advise what can i do ? thx