Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).

FTP Quote

no avatar
User

jremitz

FTP Quote

by jremitz » Thu Mar 04, 2004 12:50 pm

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]
no avatar
User

bruce

FTP Quote

by bruce » Thu Mar 04, 2004 5:04 pm

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.

e.g.

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.

Who is online

Users browsing this forum: No registered users and 24 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron