Hi All,
I am using the trial version of the enterprisedt, edtftpj-pro.jar.
I am trying to delete a file in the server, which is located in my
linux server at /var/ftp/pub/xyz/abc/test.wav.
I am using below code, but I could not delete it.
SecureFileTransferClient client = new SecureFileTransferClient();
client.setRemoteHost(host);
client.setUserName(username);
client.setPassword(password);
client.setProtocol(Protocol.FTP); // FTP is the default
client.connect();
client.changeDirectory("/var/ftp/pub/xyz/abc/");
client.deleteFile("test.wav");
client.disconnect();
I am getting this exception.
com.enterprisedt.net.ftp.FTPException: Delete operation failed.
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.delete(Unknown Source)
at com.enterprisedt.net.ftp.async.internal.DeleteFileTask.run(Unknown Source)
at com.enterprisedt.net.ftp.async.internal.FTPTaskProcessor$_A.run(Unknown Source)
can some one point me to sample code, which has exact filename
and its location formats specificed.
Any help is highly Appreciated.
Thanks & Regards,
Venkat.