procedure TForm1.Button2Click(Sender: TObject);begin IdFTP1.ChangeDir(dir); Gauge1.MaxValue:=IdFTP1.Size(filename); IdFTP1.Get(filename,'c:\'+filename,true);end;procedure TForm1.IdFTP1Work(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Integer);begin Gauge1.Progress:=AWorkCount; Application.ProcessMessages;end;