commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cole" <>
Subject Re: Question about FTPClient.sendCommand()
Date Tue, 02 Jun 2009 12:29:55 GMT
I'm not sure if I understand what you're trying to accomplish. Are you
sending FTP commands to the FTP server? If so, what command? Or are you
trying  to send operating system shell script commands? The FTP server is
only going to accept commands it understands and supports, which is not the
same as OS shell scripts.

----- Original Message ----- 
From: "Kevin Dougan" <>
To: <>
Sent: Tuesday, June 02, 2009 7:14 AM
Subject: Question about FTPClient.sendCommand()


I have been searching around a lot, trying to figure out how to properly use
the FTPClient.sendCommand() API method, but to no avail! Perhaps someone
here can answer my question very quickly...?

Basically, I want to implement a "dumb" FTP class who handles "batch
processing". I thought I could just read lines from a file, and then pass
them through to an FTP Server using the sendCommand() method, but it always
replies with "command not understood".

Am I totally off track with what I want to do here? Am I using the API
method incorrectly or for the wrong purpose?

I am trying to avoid parsing every command, doing a String compare on each
word, and then trying to match it against a specific API method
(storeFile(), retrieveFile(), etc.), depending on each String I parse...big,
long IF blocks are ugly!


Attention all humans. We are your photos. Free us.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message