Change the date modified

  • Thread starter Thread starter Cornjerker
  • Start date Start date
C

Cornjerker

I see where I can change the date a file is created....

File.SetCreationTime(path)

But how can I change the date a file is modified.

Thanks, C
 
Thanks for the reply, but this didn't change the "Date Modified" in the
windows explorer. I'll just use the date created instead.

C
 
Did you try it like this?

System.IO.File.SetLastWriteTime("c:\test.txt", New Date(2099, 5, 5))

because this should do the trick.

Greetz Peter
 

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

Back
Top