Board index » delphi » TidFTP CWD not defined

TidFTP CWD not defined


2005-10-29 10:31:01 AM
delphi22
Hello,
I am building an automatic FTP Client using Delphi7. Testing all is working
fine from my machine. On another machine a changedir is returning "CWD not
defined". Does anyone know why this error is being displayed and is there a
solution to get the changedir working?
Thanks for all your help.
Maria
XXXX@XXXXX.COM
 
 

Re:TidFTP CWD not defined

"Maria" <XXXX@XXXXX.COM>writes
Quote
I am building an automatic FTP Client using Delphi7. Testing all is
working fine from my machine. On another machine a changedir is
returning "CWD not defined". Does anyone know why this error is
being displayed and is there a solution to get the changedir working?
Assuming that TIdFTPServer is being used, then no OnChangeDirectory event
handler has been provided on the server side. Directory operations are
platform-dependant, but Indy is a platform-independant library.
Platform-dependant operations have to be handled by the application's own
code. In the case of TIdFTPServer specifically, if you don't want to write
your own directory processing code, then try assigning the server's
FileSystem property to one of Indy's FileSystem components.
Gambit
 

Re:TidFTP CWD not defined

Gambit
Thanks for your reply.
I am connecting to a power system relay device that supports the FTP
protocol. I don't think it is an TIdFTPServer.
My application connects to the FTP server just fine. When it tries to
change to the following directory: /user/ftp/tesla/record it gets the error
"CWD not defined". The fun thing is if I use an interface application and
change to each directory separately it works fine. I was thinking to use
the changedir for each directory defined, such as changedir(/user), then
changedir(/ftp), then changedir(/tesla) and finally changedir(/record).
Have you ever encountered an problems like this.
The problem is my application is a stand alone app, when a messagebox comes
up it locks up the whole system indefinitely.
Thanks for all your help.
Maria
"Remy Lebeau (TeamB)" <XXXX@XXXXX.COM>writes
Quote

"Maria" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...

>I am building an automatic FTP Client using Delphi7. Testing all is
>working fine from my machine. On another machine a changedir is
>returning "CWD not defined". Does anyone know why this error is
>being displayed and is there a solution to get the changedir working?

Assuming that TIdFTPServer is being used, then no OnChangeDirectory event
handler has been provided on the server side. Directory operations are
platform-dependant, but Indy is a platform-independant library.
Platform-dependant operations have to be handled by the application's own
code. In the case of TIdFTPServer specifically, if you don't want to
write your own directory processing code, then try assigning the server's
FileSystem property to one of Indy's FileSystem components.


Gambit

 

Re:TidFTP CWD not defined

"Maria" <XXXX@XXXXX.COM>writes
Quote
I am connecting to a power system relay device that supports
the FTP protocol. I don't think it is an TIdFTPServer.
Well, then that relay server likely doesn't implement the CWD command.
Quote
My application connects to the FTP server just fine. When it tries to
change to the following directory: /user/ftp/tesla/record it gets the
error "CWD not defined".
What is the EXACT error message in full? What exception type is being
thrown? If EIdProtocolReplyError, then what you are seeing is not an Indy
error at all. EIdProtocolReplyError means that the error that is being sent
by the FTP server, in which case the server is telling your client that it
does not implement the CWD command at all.
Quote
The problem is my application is a stand alone app, when a messagebox
comes up it locks up the whole system indefinitely.
You are likely not wrapping your code in try..except blocks so that you can
handle the errors programmably.
Gambit