Copying File or Changing File Date

Discussion in 'Java' started by rf3@rocketmail.com, Feb 24, 2005.

  1. Guest

    Hi,

    How do you change the file creation date of a file in windows using
    java. I tried the File.setLastModified() method and it is not doing
    what I hoped it would do which is to change the date time stamp
    displayed in windows explorer.

    I basically want to copy a file read via InputStream from a URL and
    written into a local file system using DataOutputStream. The problem is
    the file written using DataOutputStream is created ad hoc and creates a
    "new" file with the current datetime stamp.

    Is it possible to "copy" a file from a URL source or a server-side file
    system source and streamed to the local file system thus preserving the
    date?

    Thanks,

    -Ray
     
    , Feb 24, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    619
    Matthew Speed
    Nov 8, 2003
  2. Chumley Walrus
    Replies:
    1
    Views:
    12,201
    =?Utf-8?B?QnJpYW4gQnJvd24=?=
    Dec 16, 2004
  3. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,300
    Michael Borgwardt
    May 30, 2004
  4. Matt
    Replies:
    2
    Views:
    531
    Pete Becker
    Nov 8, 2003
  5. Matt
    Replies:
    3
    Views:
    734
    Richard Heathfield
    Nov 8, 2003
Loading...

Share This Page