Use Expect...
This is a part of script i use for getting antivirus updates...
-----start-----

#! /usr/bin/expect -f
#
# Make anonymous FTP connection
#
set timeout 300
spawn ftp [lindex $argv 0]
expect "Name"
send "anonymous\r"
expect "Password:"
send "[EMAIL PROTECTED]\r"
expect "ftp>"
send "cd pub/antivirus/datfiles/4.x\n"
expect "ftp>"
send "bin\n"
expect "ftp>"
send "prom\n"
expect "ftp>"
send "lcd /home/update\n"
expect "ftp>"
send "mget *.ini [lindex $argv 1]\n"
expect "ftp>"
send "bye\n"
-----end-----
regards
lilo
enjoy
----- Original Message ----- 
From: Chirag Kantharia <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 18, 2002 12:39 PM
Subject: Re: [ILUG-BOM] FTP script


> On Mon, Feb 18, 2002 at 07:04:03AM +0000, Philip S Tellis wrote:
> | > can any body suggest me ascript that automatically
> | > connects the server and upload or download
> | man ncftp
>  
> Does ncftp do batch upload/download? Can I have a job in the cron, to
> upload files to a remote server? A couple of months back, I wanted the
> above functionality, and had checked ncftp out, but I couldn't find it.
>  
> chyrag.
> -- 
> Chirag Kantharia, symonds.net/~chyrag/
> Linux scrooge 2.4.17 #1 Wed Jan 16 17:07:25 IST 2002 i686 unknown
> 
> _______________________________________________
> http://mm.ilug-bom.org.in/mailman/listinfo/linuxers

_______________________________________________
http://mm.ilug-bom.org.in/mailman/listinfo/linuxers

Reply via email to