Automating telnet and ftp

Hi,

I want to automate FTP. I have a fair idea that this can be done using expect scripting. But I dont how to do it. Please, can anyone give me an example of how to do it in Unix.

Thanks in advance

See Automate FTP / Scripting FTP Transfers

hi,
I have this script:
spawn ftp 135.112.22.15
expect "Name"
send "anonymous\r"
expect "Password:"
send "nobody@nowhere.com\r"
interact

Now interact connects the keyboard. If there is file in a directory known as /mani/mani1 and file name is mani1.txt. I want get this file to my machine without connecting to keyboard. That is, I want the script to get the file directly. how can I do it.

Thanks in advance