Thank you very much. He have found the problem. The servername was
incorrect.

Regards.

----- Original Message -----
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Monday, June 27, 2005 6:35 PM
Subject: Re: [twsocket] FTPClient


> Carlos Lalín wrote:
> > it Creates the first exception "not connected" but in my code:
> >     FtpClient1.Connect;
> >     if (FtpClient1.Connected) Then begin
> >         raise Exception.Create('Conected');
> >     end;
> >   this too creates the exception 'Conected'.
> >
>
> > I don't know if this server requires login, I have used the
configuration
> > that they give me. In a program FTP, it connects find and it shows all
> > files.
>
> Sorry, I mixed something up, method Connect does the login for you (very
strange naming!).
> Connect executes the 3 methods Open, User and Pass in one go.
> So in order to know what exactly went wrong try this:
>
> if not FtpClient1.Connect then
>     raise Exception.Create('Connect: ' + FtpClient1.LastResponse);
>
>
> Arno Garrels
>
> >
> > ----- Original Message -----
> > From: "Arno Garrels" <[EMAIL PROTECTED]>
> > To: "ICS support mailing" <twsocket@elists.org>
> > Sent: Monday, June 27, 2005 5:00 PM
> > Subject: Re: [twsocket] FTPClient
> >
> >
> >> What happens when you try this?
> >>
> >>> The code is:
> >>>     FtpClient1.HostName      := servername;
> >>>     FtpClient1.Port          := 'ftp';
> >>>     FtpClient1.HostDirName   := '/';
> >>>     FtpClient1.UserName      := username;
> >>>     FtpClient1.Password      := password;
> >>>     FtpClient1.LocalFileName := 'listado.txt';
> >>>     FtpClient1.HostFileName := '';
> >>>
> >>>     lista.clear();
> >>
> >> if not FtpClient1.Connect then
> >>     raise Exception.Create('not connected');
> >> if not FtpClient1.Cwd then
> >>     raise Exception.Create('CWD failed');
> >> FtpClient1.Binary := False;
> >> if not FtpClient1.TypeSet then
> >>     raise Exception.Create('TypeSet to ascii mode failed');
> >> if not FtpClient1.Ls then
> >>     raise Exception.Create('LS failed');
> >> ..
> >>
> >> Doesn't the server require a login?
> >>
> >> Arno Garrels
> >>
> >>
> >> Carlos Lalín wrote:
> >>> The code is:
> >>>     FtpClient1.HostName      := servername;
> >>>     FtpClient1.Port          := 'ftp';
> >>>     FtpClient1.Binary        := true;
> >>>     FtpClient1.HostDirName   := '/';
> >>>     FtpClient1.UserName      := username;
> >>>     FtpClient1.Password      := password;
> >>>     FtpClient1.LocalFileName := 'listado.txt';
> >>>     FtpClient1.HostFileName := '';
> >>>
> >>>     lista.clear();
> >>>     FtpClient1.Connect;
> >>>     FtpClient1.Cwd;
> >>>     FtpClient1.Ls;
> >>>
> >>>     lista.LoadFromFile('listado.txt')
> >>>     For i:=0 to lista.Count-1 do begin
> >>>         memo1.lines.add('Fichero ' + lista[i]);
> >>>     end;
> >>>     FtpClient1.Quit;
> >>>
> >>> --> lista has 0 elements.
> >>>
> >>> Regards.
> >>>
> >>> ----- Original Message -----
> >>> From: "Arno Garrels" <[EMAIL PROTECTED]>
> >>> To: "ICS support mailing" <twsocket@elists.org>
> >>> Sent: Monday, June 27, 2005 2:17 PM
> >>> Subject: Re: [twsocket] FTPClient
> >>>
> >>>
> >>>> Carlos Lalín wrote:
> >>>>> I'm sorry but this is like that. The files are there but the file is
> >>>>> empty.
> >>>>> The conection doesn't produce error.
> >>>>
> >>>> Can you show some lines of code?
> >>>>
> >>>> Arno Garrels
> >>>>
> >>>>> Carlos.
> >>>>>
> >>>>> ----- Original Message -----
> >>>>> From: "Arno Garrels" <[EMAIL PROTECTED]>
> >>>>> To: "ICS support mailing" <twsocket@elists.org>
> >>>>> Sent: Monday, June 27, 2005 1:18 PM
> >>>>> Subject: Re: [twsocket] FTPClient
> >>>>>
> >>>>>
> >>>>>> Carlos Lalín wrote:
> >>>>>>> After doing Ls, the file is empty
> >>>>>> I don't think it's possible *if the remote directory was not
> >>>>>> empty. You *may get an error in OnRequestDone if it was empty
> >>>>>> and file listing was therefore not sent.
> >>>>>>
> >>>>>> Arno Garrels
> >>>>>>
> >>>>>> Carlos Lalín wrote:
> >>>>>>> Hello,
> >>>>>>> I use the component FTPCliente to download files from a server. I
> >>>>>>> indicate the name of the file where appear the name of the files
to
> >>>>>>> download. After doing Ls, the file is empty when with another
> >>>>>>> program FTP I see that there are files. To what can it owe?
> >>>>>>>
> >>>>>>> Thank you.
> >>>>>>>
> >>>>>>> Regards.
> >>>>>>> Carlos.
> >>>>>>
> >>>>>> --
> >>>>>> To unsubscribe or change your settings for TWSocket mailing list
> >>>>>> please goto http://www.elists.org/mailman/listinfo/twsocket
> >>>>>> Visit our website at http://www.overbyte.be
> >>>>
> >>>> --
> >>>> To unsubscribe or change your settings for TWSocket mailing list
> >>>> please goto http://www.elists.org/mailman/listinfo/twsocket
> >>>> Visit our website at http://www.overbyte.be
> >>
> >> --
> >> To unsubscribe or change your settings for TWSocket mailing list
> >> please goto http://www.elists.org/mailman/listinfo/twsocket
> >> Visit our website at http://www.overbyte.be
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to