unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdExplicitTLSClientServerBase, IdFTP, StdCtrls, IdIOHandler,
IdIOHandlerSocket, IdIOHandlerStack, IdSSL, IdSSLOpenSSL, ComCtrls;
type
TForm1 = class(TForm)
IdFTPClient1: TIdFTP;
IdSSLio1: TIdSSLIOHandlerSocketOpenSSL;
InfoLine1: TEdit;
GoButton1: TButton;
RichEdit1: TRichEdit;
procedure TransferTest;
procedure GoButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.GoButton1Click(Sender: TObject); //Manuelles Starten eines Transferauftrags
begin
TransferTest;
end;
procedure TForm1.TransferTest;
begin
Form1.IdFTPClient1.Connect;
if Form1.IdFTPClient1.Connected=true
then begin
Form1.RichEdit1.Text:='';
Form1.RichEdit1.SelText:='verbunden ';
Form1.RichEdit1.SelText:= #10;
Form1.RichEdit1.SelText := 'zweite Zeile ';
end;
Form1.IdFTPClient1.Put('C:\Program Files\Borland\Delphi7\Projects\Quelle\blabla.txt','',false);
IdFTPClient1.ListResult.Clear;
IdFTPClient1.List('*',false);
InfoLine1.Text:='';
Form1.IdFTPClient1.Disconnect(true);
end;
end.