Ftp Service /process Status

:confused:
Hi
Can anyone tell me how to check the FTP process status in linux .
eg,I'm ftpping some files from "A" server to "B" server through FTP command ,
after ftpping these files , I 'm suppose to delete the files which are successfully ftpped from "A" server ,but when I 'm checking the ftp status it always showing status as "0" (echo $?) only ,So how to retrive the correct status ?

status will be 0, simply because the command succeeded - even if you do "ftp server" and then break with Ctrl^C status will still be 0. You should instead check for the existance of the transfered files with "ls", verify they are on the remote location and then delete the files.