procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Lines.Clear(); clFtp1.Server := edtHost.Text; clFtp1.Port := StrToInt(edtPort.Text); clFtp1.UserName := edtUser.Text; clFtp1.Password := edtPassword.Text; clFtp1.Open(); try FLevel := ''; GetRecursiveList(edtRoot.Text, ''); finally clFtp1.Close(); end; ShowMessage('Done'); end;
procedure TForm1.GetRecursiveList(const ADirName, ALevel: string); var old: string; begin old := FLevel; try FLevel := FLevel + ALevel; clFtp1.ChangeCurrentDir(ADirName); clFtp1.DirectoryListing(); clFtp1.ChangeToParentDir(); finally FLevel := old; end; end;
procedure TForm1.clFtp1DirectoryListing(Sender: TObject; AFileInfo: TclFtpFileInfo; const Source: string); begin Memo1.Lines.Add(FLevel + AFileInfo.FileName); if (AFileInfo.IsDirectory) then begin GetRecursiveList(AFileInfo.FileName, #9); end; end;
Trouble logging in? Simply enter your email address OR username in order to reset your password.
For faster and more reliable delivery, add admin@clevercomponents.com to your trusted senders list in your email software.