From: Sooraj S on
Hi,

I have an expect script which uploads some data to an FTP server...

I wanted to put a whole directory as such into it.
But i couldn't find any commands for that. (Is there any ftp command
for it...?)
So i am creating the directory and then putting all the files using
ftp command "mput"..

code
----------------
process "$prompt" "lcd $data\r" #change pwd to $data on
local machine
process "$prompt" "mkdir $data\r" #create directory $data on
remote machine
process "$prompt" "mput *\r" #put all the (only) files
in $data on local machine into

$data on remote machine

#wrong while loop
while {expect "?"} { # logic is that for
each and every files needs to be
transfered,
ftp will prompt like this "?"..
send "y\r"
}

is there any way to handle this (using while loop)..