Download previous day files through FTP

Hi All,

I have a scenario where I need to download the previous day modified files from other server to my server through FTP . Could any one please send me the shell script for the same.

I used the following but I dont know how to proceed after this.

ftp -n -i -v $IP <<ENDOFinPUT >> ftpscript.txt
quote user $user
quote pass $password
passive
prompt
type binary
ls *.*
bye
ENDOFinPUT
exit;

You get the file listing so you can grep for timestamps which could be built something along the lines of like 'date "+%b %d" --date="1 day ago"'?..

for the reply.

As I am new to shell scripting I am unable to use the same.
Plz guide me how to use that list to get the files.

Then posting a solution wouldn't do you any good. Maybe first read some Bash scripting guides?:
BASH Programming - Introduction HOW-TO
Bash Guide for Beginners
(maybe save Advanced Bash-Scripting Guide for later).