#!/bin/sh
# \
exec tclsh

source ftp.tcl

set ftp::VERBOSE 1
## set ftp::DEBUG   1

set c [ftp::Open localhost foo bar -port 7777]

puts _________________________________________________

set out [open bar w]
ftp::Get $c MANIFEST -channel $out
close $out ; # We are responsible for the close

puts _________________________________________________

set in [open [info script] r]
ftp::Put $c -channel $in FOOBAR ; # ftp closes the channel $in

puts _________________________________________________
ftp::Close $c
exit

