Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Oct : IdFTP.List throws Socket Error #10061 Connection Refused if filespec not found

www.cryer.info
Managed Newsgroup Archive

IdFTP.List throws Socket Error #10061 Connection Refused if filespec not found

Subject:IdFTP.List throws Socket Error #10061 Connection Refused if filespec not found
Posted by:"James H" (plea..@reply.in.forum)
Date:Thu, 26 Oct 2006 15:27:20

Folks,

Title pretty much says it all but here's the code in case it's just me being
a plank:

var
  ServerFileList: TStringList;
  sFileSpec: string;
begin
  if not IdFTP.Connected then
    FTPConnect(zHost, zUsername, zPassword);

  ServerFileList:= TStringList.Create;
  try
    sFileSpec:= '*.wcc';

    IdFTP.List(ServerFileList, sFileSpec, FALSE);

    // do something here with ServerFileList

  finally
    ServerFileList.Free;
  end;
end;

I'm using Delphi 6 Pro update pack 2.

Thanks,
James

Replies:

www.cryer.info
Managed Newsgroup Archive