Check the ind file before FTP data file....

Hi All,
I have posted this issue in the forum, but i did not get any answer. If someone knows about it, could you please let me know hoiw to do it?
i am FTP the file from one server to another. The code in FTP should first check the indicator file is available or not? For example, for the data file IN_EMP_DEPT.txt, the indicator file will be IN_EMP_DEPT.ind. If indicator file is available, it should start copying data file from remote server to local server. If not, it should wait for 5 minute and then again check for indicator.
Below is my code, which i am suing to FTP the file.

 
ftp -nvi $HOST <<"EOT" >> $LOG
quote user abc
quote pass abc
prompt
cd /XXX
lcd /common/CCC
mget IN_EMP_DEPT.txt
bye
EOT

You could try to ftp the indicator file to your local host. From the subsequent presence of a copy of that file on your system you can conclude that transfer was successful. If not, then repeat after 5 minutes. If it was successful, then that is the green light to immediately start the transfer of the actual data file and delete the transferred copy of the indicator file. I am sure there are more sophisticated methods, bit this is very simple and the commands for both ftp transfers are almost identical.