Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
in .NET FTP by
Hey guys,

I just had a quick question, guaranteed I'm doing something wrong, but I was just using your FTPClient to make a java ftp gui, and wanted to also have command line access. I've been trying to use quote(...,[...]) to do this, then put the result in a string, and display the string. (ex: ls -l) Buuut, it doesn't do anything. Is my understanding wrong? is this not what it is meant for, or am i doing something wrong, or is there another way around this? Thanks[/quote]

1 Answer

0 votes
The quote() method lets you enter any standard FTP command. It doesn't give support for shell commands like "ls". You need to supply the expected return code, see RFC959.


String[] validCodes = {"213"};
quote("SIZE filename", validCodes);

You might be after the site() method, which sends site specific commands.

FTP on a commandline client to the server and type "HELP SITE" for what your server supports.