Hi All,
I am using the trial version of the enterprisedt, edtftpj-pro.jar.
I am trying to test your UploadDownloadFiles java file.
I am trying to upload 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 upload a file.
FTPClient ftp = new FTPClient();
ftp.setRemoteHost(host);
ftp.connect();
ftp.login(username, password);
ftp.chdir("/var/ftp/pub/abc/xyz/");
ftp.setType(FTPTransferType.BINARY);
ftp.put(new FileInputStream(new File("c:/temp/test.wav")), "test1.wav");
I am getting this exception.
com.enterprisedt.net.ftp.FTPException: Could not create file.
at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.initPut(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.A(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.put(Unknown Source)
at com.enterprisedt.net.ftp.FTPClient.put(Unknown Source)
can some one point me to sample code, which has exact filename
and its location formats specificed, or else can you point out where I am wrong.
Any help is highly Appreciated.
Thanks & Regards,
Venkat.