ftp Library Package 2.1 for Tcl/Tk help file

  ftp Library Package 2.1 for Tcl/Tk Manual Pages

  COMMAND
    ftp::Get handle remote ?(local | -variable varname)?
    The ftp::Get command retrieves a remote file remote on the ftp server to a local file local. If '-variable varname' is specified, then the variable 'varname' will get the retreived data stored in it, rather than storing the data in a file. 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 $conn index.htm

        # retrieve different file names
        ftp::Get $conn index.htm new.htm

        # with different fully qualified path name
        if [ftp::Get $conn /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