Thanks for all your help, guys. Yes that makes a lot of sense. I didn't
realise CWD only changed directory RELATIVE to the current directory.
I've tried adding a '/' to the start of the path, but that didn't work.
I've also tried a '\', but that didn't work either. Whats the easiest way
of
Thanks for all your help, guys. Yes that makes a lot of sense. I didn't
realise CWD only changed directory RELATIVE to the current directory.
Not exactly. CWD change directorie according to what you pass as argument.
If you pass an absolute directory, so does it change.
If you pass a relative
rick cusimano wrote:
Could anyone suggest a resolution or a better way to debug what's
going on?
If you do not provide the error number as well as the error text,
how should anybody know what's going on?
When CWD failes log FtpClient1.LastResponse as well as
FtpClient1.ErrorMessage.
---
I was asked to check what error is bought up but unfortunately the
FTPClient
component doesn't generate an error via the OnError event (though it does
for other things so I know I'm checking it right).
It is likely an error at the application level, that is sent by the FTP
server. PLEASE
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
Send code examples.
My guess is that you are in directoy 1\2\3 and then attempting to CWD to
a\b\c\d without returning to the parent directory first, so that you are
really trying to change to directory 1\2\3\a\b\c\d without realizing it.
Sincerely,
Brad Gies
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\'.
Hi,
Current dir is \
HostDirName = '1\2\3\';
Cwd; // No Failure
of course
HostDirName = 'a\b\c\d\';
Cwd; // ERROR: 550 a\b\c\d\ : The system cannot find the path specified.
Haha, no surprise. The server is now looking for \1\2\3\a\b\c\d, and that
porbably doesn't exist.
Set hostdirname
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\';
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 ...
No, that would require an extre round-trip. As
others have pointed out, you should use absolute
paths by starting all your paths with a '/' (or '\'
in the
Warning: The root directory is not necessary the directory where you are
when you log into the ftp server which is the home directory. Home
directory and root directory may be the same, but not always.
--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL
As requested I've done some more testing with this, however I'm not getting
any closer.
Just to reiterate, I'm trying to do a recursive download from an FTP Server
to basically do a full backup. It works fine most of the time, but
occasionally the Cwd command fails to change directory causing
Just to reiterate, I'm trying to do a recursive download from an
FTP Server to basically do a full backup. It works fine most of
the time, but occasionally the Cwd command fails to change
directory causing files to be downloaded in the wrong place.
Try using my File Transfer Components
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
Rick,
if CWD fails, why do you expect it could work if you just try it again?
-gunnar
- 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,
On Oct 8, 2006, at 06:42, rick cusimano wrote:
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)
Perhaps its a permission issue? If so, you won't be able to change to
that
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
I'm not sure, but the code I posted up seems to work?
I had an issue where, basically, a CWD command would fail when changing
between directories that are 3 or 4 layers deep. For some reason the code I
posted works most of the time (don't ask me why), but like I said it still
occasionally
Just to clarify, these are directories that I KNOW exist - I'm doing a
recursive download from an FTP site. How would you recommend I recover from
a failed CWD command?
That doesn't mean that you are allowed to access these directories. If CWD
fails, there's a reason for that, usually on
Just to clarify, these are directories that I KNOW exist - I'm doing a
recursive download from an FTP site. How would you recommend I recover
from
a failed CWD command?
I can't recommand anything before knowing the exact error.
Contribute to the SSL Effort. Visit
20 matches
Mail list logo