Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.1k views
in Java FTP by (120 points)
Hi,

I'm using com.enterprisedt.net.ftp.FileTransferClient to download files from FTP Server.
Now the Problem is we must compare the files on the local machine on the base of lastModified date
if the lastModified is not the same download the file with

 ftp.downloadFile("test.txt", "test.txt");


it copy's the file ok but the lastModified is not the same as on FTP Server.
it creates new lastModified and create date

thx

Luka

1 Answer

0 votes
by (162k points)
When a file is downloaded we don't set the last modified time to that of the file on the server.

However this is easy to do if you want to do this - just get the last modified time of the remote file after you've done the download and set the local file's time to that. I don't believe you can change the create time in Java (or even obtain it).

Categories

...