hover animation preload hover animation preload hover animation preload
wordpress post entry title background
FTPplanet.com forums
post entry title background

File Transfer Planet Forums » FTP New Users

Changing timestamp of FTP?

(1 post)
  • Started 2 years ago by randy_ortan
  • This topic is not resolved

Tags:

  1. randy_ortan
    Member

    I am using apache commons-net-1.4.1.jar for FTP file transfer in my Java application.

    When files are uploaded to server using FTP, modified time of file being uploaded is changed to current time instead of actual modified time of file in local system.

    For eg, consider the file to be uploaded to server is “test.doc”. Modified time of this file in local system is “2009-12-30 2.30pm”. And when this file is uploaded to server at 5.30 pm, after upload, the time stamp of the file uploaded to server is changed to “2009-12-30 5.30 pm” instead of keeping the actual time stamp “2009-12-30 2.30pm”.

    Following is the part of my java code which stores file to server.
    [code]

    File f = new File(localfilePath);
    System.out.println("Storing file as remote filename: " + f.getName());
    boolean retValue = http://ftp.storeFile(f.getName(), new FileInputStream(f));
    if (!retValue) {
    throw new Exception ("Storing of remote file failed. http://ftp.storeFile()" +
    " returned false.");
    }

    [/code]
    Does apache commons package contain any methods for setting the time stamp of file uploaded in server?

    Is any other FTP package available which overcomes the issue stated above?

    Thanks in advance.

    Posted 2 years ago #

RSS feed for this topic

Reply

(required)

Allowed markup: a blockquote code em strong ul ol li img.
You can also put code in between backtick ( ` ) characters.


Fatal error: Call to undefined function mini_stats() in /home/ftplanetipswitch/filetransferplanet.com/forums/my-templates/flapkakumei/footer.php on line 19