FTP Library Package 1.2 for Tcl/Tk Manual Pages

COMMAND
FTP::Get  remote  ?local?
 
The FTP::Get command retrieves a remote file remote on the ftp server to a local file local. The file parameters passed must contain a fully qualified path name, otherwise the command uses the current directory. If local file name is unspecified, the remote file name is assigned to the remote file name.

If the file was successfully transferred, then the command returns 1, if it fails 0.

EXAMPLE
# retrieve unique file name
FTP::Get index.htm

# retrieve different file names
FTP::Get index.htm new.htm

# with different fully qualified path name
if [FTP::Get /incoming/foo.tar.gz /usr/local/src] {
	cd /usr/local/src
	exec gunzip foo.tar.gz
	exec tar xf foo.tar
}
	

[Contents]  [Previous: FTP::Append]  [Next: FTP::Reget]


© 1999 Steffen Traeger