I am creating a Android client which successfully uploads a file to my ftp server. I am using ftp4j library and want to send my custom command like this. e.g
mycustomcommand is a kind of tcp command..
FTPClient client = new FTPClient();
try {
client.connect(FTP_HOST, 21);
client.login(FTP_USER, FTP_PASS);
client.setType(FTPClient.TYPE_BINARY);
client.changeDirectory("/Test/Uploads/");
client.upload(fileName, new MyTransferListener());
/**
* Need help in this
*/
FTPReply reply = client.sendCustomCommand("mycustomcommand");
Log.e(TAG,"reply="+reply.toString() );
}
Is it possible to do so using ftp or may be I need to use some another method like sockets..?
I just want to perform the action on server side based on mycustomcommand like upload or delete or rename..