> I've been having some issues with FTPClient where sometimes, on some > servers, it would fail to change the working directory (thanks to whoever > pointed that out btw)
What is the error returned by the server or the component ? Knowing the error would help solving the problem. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "rick cusimano" <[EMAIL PROTECTED]> To: <twsocket@elists.org> Sent: Sunday, October 08, 2006 12:42 PM Subject: [twsocket] How to handle a failed CWD with FTPClient... > Hi, > > I've been having some issues with FTPClient where sometimes, on some > servers, it would fail to change the working directory (thanks to whoever > pointed that out btw) > > I've been trying to change the code to test for this and I thought I had > it > cracked, but its still not quite right. > > This is the code which seems to work best so far, but it still > occasionally > fails: > > if not(Cwd) then > begin > Quit; > Connect; > HostDirName := SubDir; > Cwd; > end; > > This is part of a function which retrieves a file listing, which is then > passed onto another function which attempts to download each file. I also > tried the following code, which I thought made more sense: > > if not(Cwd) then > begin > Quit; > HostDirName := SubDir; > if not(Connect) then exit; > end; > > With the intention being that if after 2 attempts you still can't get a > file > listing, just skip it. Unfortunately this seemed to make it go completely > mental so it must be doing something odd. > > Any suggestions please? > > Cheers > > Rick > > > -- > 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