FTP Files Sequentially

Hi Gurus,

i have to transfer files one by one from ftp server to target server

all files which is to be transferred lies in one ftp folder

i have to move those files sequentially from ftp to target and must verify files for successful transmission .

then i have to delete corresponding files in ftp

the above said process should be done until all files in the ftp are deleted.

Help/Ideas from any one is really apperciated

maybe you can build a directory listing on the ftp server and compare that with the files after the transfer.