Hi, Isn't CWD command supposed to work from the directory you are in?
Example: > HostDirName = '1\2\3\'; > Cwd; // No Failure I think this doesn't fail because the directory "1" is placed inside the current working directory. Wich does not happen in the second CWD: > HostDirName = 'a\b\c\d\'; > Cwd; // ERROR: 550 a\b\c\d\ : The system cannot find the path specified. Where the directory "a" is not inside the directory "3" wich is the current working directory (after the successfull first CWD). So you should first change the working directory to the "root" path and then try the second CWD command with the "a\b\c\d" HostDirName ... I'm shooting in the dark here, for I don't use FTPs much and never used the ICS FTP Client, but it's worth a try ... Regards, Marcelo Grossi ----- Original Message ----- From: "rick cusimano" <[EMAIL PROTECTED]> To: <twsocket@elists.org> Sent: Tuesday, October 10, 2006 2:22 PM Subject: Re: [twsocket] How to handle a failed CWD with FTPClient... > Hello, > > Thanks for pointing out that I can retrieve the last response from the > server, I didn't realise Cwd results came just as a response and not as an > event. > > Ok so this is what happens: > > HostDirName = '1\2\3\'; > Cwd; // No Failure > > HostDirName = 'a\b\c\d\'; > Cwd; // ERROR: 550 a\b\c\d\ : The system cannot find the path specified. > > > But when I reverse the order of the directories: > > > HostDirName = 'a\b\c\d\'; > Cwd; // No Failure > > HostDirName = '1\2\3\'; > Cwd; // ERROR: 550 1\2\3\ : The system cannot find the path specified. > > > The path obviously exists. This error only seems to occur with > directories > 3 or more levels deep, and happens regardless of which server I test it > on. > > Like I said previously the following code seems to fix this problem some > of > the time: > > if not(Cwd) then > begin > Quit; > Connect; > HostDirName := SubDir; > Cwd; > end; > > Can anyone suggest anything else I could try? > > 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