all groups > vb.net > january 2006 >
You're in the

vb.net

group:

Change the date modified


Change the date modified Cornjerker
1/19/2006 9:27:07 PM
vb.net: 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
Re: Change the date modified Peter Proost
1/20/2006 9:23:11 AM
Hi

File.SetLastWriteTime(path,date)

Hth,

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"Cornjerker" <addoty@gmail.com> schreef in bericht
news:1137734827.505075.14150@z14g2000cwz.googlegroups.com...
[quoted text, click to view]

Re: Change the date modified Cornjerker
1/21/2006 7:13:17 AM
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
Re: Change the date modified Peter Proost
1/23/2006 9:37:52 AM
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

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)


"Cornjerker" <addoty@gmail.com> schreef in bericht
news:1137856397.567937.261750@g14g2000cwa.googlegroups.com...
[quoted text, click to view]

AddThis Social Bookmark Button