Re: Reading the "answers" ( 220 ) from the FTP server

Giganews Newsgroups
Subject: Re: Reading the "answers" ( 220 ) from the FTP server
Posted by:  Remy Lebeau (TeamB) (
Date: Tue, 1 Feb 2005

"Paulo Germano" <pg…> wrote in message

> i just have a little question...... when i log into my localmachine ftp
> using FlashFXP i get all that info ( the info is shown on the footer of
> this message ).. i would like to show it also on my FTP client
> application... how do i capture this info from the server i connect ??

When you first connect, the Greeting property is updated with the intro
text.  Every command that is sent after that updates the LastCmdResult
property, which has a Text subproperty.

> Connecting to localhost
> Connected to localhost -> IP= PORT=21

The OnStatus event can be used for those.

> 220-Serv-U FTP Server v5.1 for WinSock ready...

All of that introductory text is stored in the Greeting property.  You an
also use the OnBannerBeforeLogin event.


The only way to get the actual commands that TIdFTP is sending over the
socket is to attach a TIdConnectionIntercept class, such as TIdLogEvent, to
the connection's IOHandler.Intercept property.  Then you can use the
Intercept's OnSent, OnReceived, and OnStatus events.



In response to

Reading the "answers" ( 220 ) from the FTP server posted by Paulo Germano on Tue, 01 Feb 2005