How to copy to server & delete locally?

Hi,
I've got a cronjob running daily creating backup files. How can I send that created file to a remote server & then delete it on my workstation to save space? The filename format is as follows: proj_bk_20070624_15h30, proj_bk_20070625_15h30, etc

tar cvf - /project | gzip -c > proj_bk_$(date '+20%y%m%d_%Hh%M').tar.gz
ftp remote_server << EOT
binary
put ?????.tar.gz (How do I put the latest created pro_bk file onto the remote server?)
quit
EOT
rm ?????.tar.gz (How do I delete the sent file locally?)

If you are moving the file on daily basis then only 1 file with "proj_bk*" is present on the server, incorporate the following changes in the ftp part.

prompt
mput proj_bk_$(date '+20%y%m%d')_*.tar.gz

After end of FTP just remove the file
rm proj_bk_$(date '+20%y%m%d')_*.tar.gz

Hope this helps....

Thanks navkanwal, this should work if only I make sure the script completes running before 0h00.

In that case u may ftp the file

proj_bk*.tar.gz

U can exclude the date parameter from the file...