Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
8.1k views
in .NET FTP by
Hi,

I am using your FTPClient in my project to make an automatic ftp update. I have a problem.

I have recoded your chdir method to use CD instead of CWD. The problem is that even though everything seems fine when I debug, I can never get the chdir command to work. The response code I get is the same as when I test on a DOS ftp client and use a quote command instead of a CD command directly ('CD ': command not understood).

Do you have a tip to how I can overcome this problem?


Thanx,

Morten

4 Answers

0 votes
by
I'm not sure why you needed to recode chdir()? CD isn't an FTP command, that's probably why it is not understood by the server.

Hi,

I am using your FTPClient in my project to make an automatic ftp update. I have a problem.

I have recoded your chdir method to use CD instead of CWD. The problem is that even though everything seems fine when I debug, I can never get the chdir command to work. The response code I get is the same as when I test on a DOS ftp client and use a quote command instead of a CD command directly ('CD ': command not understood).

Do you have a tip to how I can overcome this problem?


Thanx,

Morten
0 votes
by
Thank you for you quick reply :)

I tried with the CWD command that was in the code originally but that also failed. The reason seems to be that my FTP server doesn't support this. In the list of commands I get when typing help includes CD but not CWD.


Morten
0 votes
by
I have included some more info here:

I am not sure of the make of the FTP server, but here is the welcome message:

220 FTP server (Version 5.311PWS/AI) ready.

Here are the available commands:

! delete literal prompt send
? debug ls put status
append dir mdelete pwd trace
ascii disconnect mdir quit type
bell get mget quote user
binary glob mkdir recv verbose
bye hash mls remotehelp
cd help mput rename
close lcd open rmdir
[/b]
0 votes
by
The available commands look like the client-side commands, not the server ones.

The best way to find out the FTP server commands is to ftp to it via a command line tool (e.g. ftp in Windows).

Once logged in, type

debug

to get into debug mode.

Then cd to a directory, you'll see something like

--> CWD directory

appear as all commands sent to and from the server are shown in debug mode.

This should show you what command is actually sent when you cd


I have included some more info here:

I am not sure of the make of the FTP server, but here is the welcome message:

220 FTP server (Version 5.311PWS/AI) ready.

Here are the available commands:

[/b]

Categories

...