F
fenghai4690
Unregistered / Unconfirmed
GUEST, unregistred user!
idftp1.connect;
IdFTP1.ChangeDir(afilename);
idftp1.List;
filecount:=idftp1.DirectoryListing.Count;
for i:=0 to filecount-1 do
begin
idFTP1.Get(idFTP1.DirectoryListing.FileName,apath,true);
end;
这段代码执行到idftp1.list会报错,说"ConnectionClosedGracefully".最要命的是idftp1.DirectoryListing.Count返回植始终为0,请问这段代码错在哪里?该如何改正,谢谢!
IdFTP1.ChangeDir(afilename);
idftp1.List;
filecount:=idftp1.DirectoryListing.Count;
for i:=0 to filecount-1 do
begin
idFTP1.Get(idFTP1.DirectoryListing.FileName,apath,true);
end;
这段代码执行到idftp1.list会报错,说"ConnectionClosedGracefully".最要命的是idftp1.DirectoryListing.Count返回植始终为0,请问这段代码错在哪里?该如何改正,谢谢!