1<html> 2<head> 3<title>ftp Library Package 2.1 for Tcl/Tk help file</title> 4</head> 5<body bgcolor="#ffffff" text="#000000"> 6<body> 7 8<p> 9<dl> 10 <dd> 11 <p><font face="Arial,Helvetica" color="#526e9c" size="+2"><b>ftp Library Package 2.1 for Tcl/Tk Manual Pages</b></font></p> 12 </dd> 13 14 <dd><font face="Arial,Helvetica" size="+1"><b>COMMAND</b></font></dd> 15 <dd><dl> 16 <dd><b>ftp::Get</b><em> handle remote ?(local | -variable varname)?</em></dd> 17 <dd> </dd> 18 <dd> 19 20 The <b>ftp::Get</b> command retrieves a remote file <em>remote</em> on the 21 ftp server to a local file <em>local</em>. If '-variable varname' is 22 specified, then the variable 'varname' will get the retreived data 23 stored in it, rather than storing the data in a file. The file 24 parameters passed must contain a fully qualified path name, otherwise 25 the command uses the current directory. If local file name is 26 unspecified, the remote file name is assigned to the remote file name. 27 28 <p>If the file was successfully transferred, then the command 29 returns 1, if it fails 0. </p> 30 31 </dd> 32 </dl></dd> 33 34 <dd><font face="Arial,Helvetica" size="+1"><b>EXAMPLE</b></font></dd> 35 <dd><dl> 36 <dd> 37 <pre># retrieve unique file name 38ftp::Get $conn index.htm 39 40# retrieve different file names 41ftp::Get $conn index.htm new.htm 42 43# with different fully qualified path name 44if [ftp::Get $conn /incoming/foo.tar.gz /usr/local/src] { 45 cd /usr/local/src 46 exec gunzip foo.tar.gz 47 exec tar xf foo.tar 48} 49 </pre> 50 51 </dd> 52 </dl></dd> 53</dl> 54</p> 55<p> 56[<a href="index.html">Contents</a>] 57[<b>Previous:</b> <a href="fhelp125.html">ftp::Append</a>] 58[<b>Next:</b> <a href="fhelp14.html">ftp::Reget</a>] 59</p> 60<p align="left"><hr noshade size="1"><font face="Arial,Helvetica" size="-1">© 1999 <a href="mailto:Steffen.Traeger@t-online.de">Steffen Traeger</a></font></p> 61</body> 62</html> 63