Standard documentation appears at http://tcllib.sourceforge.net/doc/ftp.html .
Related pages:
Here's an example implementation of a "deep" listing, which recurses into subdirectories:
proc deep_list {host user pass dir} { set handle [::ftp::Open $host $user $pass] set result [::ftp::DeepList $handle $dir] ::ftp::Close $handle return $result } proc ::ftp::DeepList {handle directory} { set result {} set original [::ftp::Pwd $handle] foreach item [::ftp::NList $handle $directory/*] { # Why two clauses in the predicate? Because there's # a fault somewhere in ftp, and we must handle # both sides. if {[catch {::ftp::Cd $handle $item} ret_val] || !$ret_val} { lappend result $item } else { ::ftp::Cd $handle $original set result [concat $result [deep_list_i $handle $item]] } } return [lsort $result] }
Use this as
set list_of_files [deep_list $host $user $pass $directory]
Category Package (sub-package of Tcllib)