Script to FTP,clean up and email

Hi i need a unix script to do the following tasks.
My folder structure is /home/MSTR/test and will have the following folder within it
Cache
Lookup
Source
Target

  1. On the Source & Target folder i have to take a copy of files older than 5 days and move(FTP) it into local machines C:\Backup drive.Then remove the old files.
  2. On the Cache and look up folders i have to take a copy of files older than 2 days and move(FTP) it into local machines C:\Backup drive.Then remove the old files.
  3. On the days before removing i have to send a mail to a mail id stating that these files from this path will be removed by tomorrow.

you have put a question or assignment here?

for file searching older than 5 days

 find dir_name/file_pattern -type f  -mtime +5  

use a temp file to list your desired files and use it where ever you want.

for ftp use

ftp -v -n <server_node> << EOF
user <user_id> <password>
bin
hash
cd <remote_dir>
lcd <local_dir>
mput <files>
bye
EOF