Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Nov : Re: TidFTP succesfully creates a directory WITH an exception

www.cryer.info
Managed Newsgroup Archive

Re: TidFTP succesfully creates a directory WITH an exception

Subject:Re: TidFTP succesfully creates a directory WITH an exception
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Wed, 21 Nov 2007 09:42:53

"Richard" <ritchie872@yahoo.com> wrote in message
news:4743fdaa@newsgroups.borland.com...

> I am working with TidFTP and testing it with different servers.
> It works fine almost always, but I have an odd server (CrossFTP
> server) that is giving me some problems. When creating a
> directory using the usual TidFTP.MakeDir, the directory is
> succesfully created BUT the client raises an exception with the
> message: "/public/MyDir" created.

The only way that can happen is if the FTP server is reporting back a
response code other than 257, which is the only success code defined for the
MKD command in RFC 959.  TIdFTP will interpret any other value as an error.
What is the actual response code that is being returned?  You can get it
from the LastCmdResult.NumericCode property (you can wrap the MakeDir() in a
try..except block), or use an external packet sniffer to look at the raw
packet traffic.


Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive