Not to be rude, but this really isn't a Linux question. You're asking someone to write and debug a script for you. If you're the admin or programmer, that's your job. If not, hire one.
If you have a real Linux related question, such as "my FTP server is giving me error XXXX", or "I'm having problems with iptables in regards to FTP..", this is the place.