You are using relative paths and so the oerder is very important.
If you cwd to 'a\b\c\d\' and then to '1\2\3\' it is the same as doing a cwd 
to 'a\b\c\d\1\2\3\' at the first place.
If you first cwd to '1\2\3\' and then to 'a\b\c\d\', then is is the same to 
do at once a cwd to '1\2\3\a\b\c\d\'.
All those path a relative to the current directory, including the one you 
have when starting the connection (use pwd to know the current directory).


--
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: Tuesday, October 10, 2006 7: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

Reply via email to