Copying File or Changing File Date

R

rf3

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top