Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
in General by (120 points)
i have downloaded edtftpj/pro trial version for ftp(com.enterprisedt.net.ftp.ssh.SSHFTPClient) for transferring of file from my machine to remote machine using put method. Size of each file is between 50KB -100 KB. But out of 10 files which i had transferred, 4 files were successfully transfered to remote machine.Rest of 6 files were not transferred completely to remote machine(some few 12-28 bytes were missing).
I am not able to understand who eats file bytes silently while transfering of file.
os configuration for source machine - Linux 2.6.18-92.el5 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
os configuration for remote machine - Linux 2.6.32-431.el6.x86_64 #1 SMP x86_64 x86_64 x86_64 GNU/Linux

It is really awful.Any help is appreciated. I have spend hours trying to play around with this but have got nowhere.
Note -- All files were successfully transferred on command prompt by using sftp command.
by (156k points)
Are the bytes missing off the end of the files, or are the files smaller? If it is the latter, make sure you are transferring in binary mode.
by (120 points)
Thankx for reply,
Files are smaller in size.(File-size at source machine-102064 & file-size at remote machine:102063)
For transferring of file i am using binary transfer mode.
SSHFTPClient ftp=new com.enterprisedt.net.ftp.ssh.SSHFTPClient();
by (156k points)
Try setDetectTransferMode(false) prior to connecting.
by (120 points)
Thankx for reply! But default value is off/false means auto-detect of file type is off,it shall not detect transfermode.
reffered from link-https://enterprisedt.com/products/edtftpj/doc/api/com/enterprisedt/net/ftp/FTPClient.html#setDetectTransferMode%28boolean%29
by (156k points)
Unfortunately there's an inconsistency in the behavior - it is actually on for SFTP.
by (2.7k points)
It might be helpful if you post the code you're using (by editing your question).  It might also be helpful if you use the "cmp -l" command to compare the two files.  This will tell us whether the file has been truncated for whether there's data missing in the middle of the file.

Please log in or register to answer this question.