unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdFTP, StdCtrls, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient;
type
TForm1 =
class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Button1: TButton;
IdFTP1: TIdFTP;
Edit5: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var idftp:Tidftp;
begin
idftp:=TIdftp.Create(Self);
idftp.Username:= Edit1.text;
idftp.Password:= Edit2.Text;
idftp.Port:=StrToInt(Edit3.Text);
idftp.Host:= Edit4.text;
try
idFTP1.Connect;
IdFTP1.ChangeDir(Edit5.Text);
except
showmessage('
überprüfe Angaben!!!');
end;
end;
end.