Sample code for 30+ languages & platforms
Tcl

FTP FEAT Command

See more FTP Examples

Sends a FEAT command to the FTP server and returns the response. Here is a typical response:
211-Features:
 MDTM
 REST STREAM
 SIZE
 MLST type*;size*;modify*;
 MLSD
 AUTH SSL
 AUTH TLS
 UTF8
 CLNT
 MFMT
211 End

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

# This example requires the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set ftp [new_CkFtp2]

CkFtp2_put_Hostname $ftp "ftp.example.com"
CkFtp2_put_Username $ftp "test"
CkFtp2_put_Password $ftp "test"

# Connect and login to the FTP server.
set success [CkFtp2_Connect $ftp]
if {$success != 1} then {
    puts [CkFtp2_lastErrorText $ftp]
    delete_CkFtp2 $ftp
    exit
}

set ftpResponse [CkFtp2_feat $ftp]

puts "$ftpResponse"

set success [CkFtp2_Disconnect $ftp]

delete_CkFtp2 $ftp