[ILUG] tcl question

Padraig Brady Padraig at AnteFacto.com
Tue Mar 13 11:32:41 GMT 2001


Why don't you use the shell like:

#-----------------------------
dest_dir="/tmp"
src_dir="/pub"
remote_server="ftp.nowhere.com"

echo "open $remote_server
user ftp pass at pass.com
cd $src_dir
bin
get porno.jpg
quit" |
ftp -nv
#-----------------------------

I've already done a script that
takes the variables on the command
line and has a passive ftp mode
even if the ftp client doesn't
support it (you need to have a
ftp server on the dest_dir machine).

Padraig.

Paul Jakma wrote:

> how in the name of god do you change the cwd in tcl? i'm putting a
> leettle expect script together to grab  a file via ftp and put it in
> the relevant place (on a linux box.. cough).
> 
> but i just can not find the tcl equivalent of chdir(2).
> 
> any tcl fanatics here? (kate, didn't you used to play with
> aolserver?)
> 
> regards,





More information about the ILUG mailing list