C
caoliu
Unregistered / Unconfirmed
GUEST, unregistred user!
我已经用ClientSocket连结并登陆到一个FTP服务器下的目录
但怎么用ClientSocket list FTP服务器下的目录?
procedure TForm1.ClientSocket1Connect(Sender: TObject;
Socket: TCustomWinSocket);
begin
Socket.SendText('USER '+myini.ReadString(nodestr,'User','')+#13#10);
ftp_timeout;
Socket.SendText('PASS '+myini.ReadString(nodestr,'Password','')+#13#10);
ftp_timeout;
Socket.SendText('PWD'+#13#10);
ftp_timeout;
Socket.SendText('PASV'+#13#10);
ftp_timeout;
..............
这里要加什么?
..............
Socket.SendText('List '+#13#10);
ftp_timeout;
end;
但怎么用ClientSocket list FTP服务器下的目录?
procedure TForm1.ClientSocket1Connect(Sender: TObject;
Socket: TCustomWinSocket);
begin
Socket.SendText('USER '+myini.ReadString(nodestr,'User','')+#13#10);
ftp_timeout;
Socket.SendText('PASS '+myini.ReadString(nodestr,'Password','')+#13#10);
ftp_timeout;
Socket.SendText('PWD'+#13#10);
ftp_timeout;
Socket.SendText('PASV'+#13#10);
ftp_timeout;
..............
这里要加什么?
..............
Socket.SendText('List '+#13#10);
ftp_timeout;
end;