Hello,
I'm trying to save a files save date, modify that file and then restore the file back to it's original date. I can't get it to work, I've tried it several ways and cannot get it to work.
My code so far is
origdate = My.Computer.FileSystem.GetFileInfo("inspection").LastWriteTime.ToShortDateString()
' changing file content here
System.IO.File.SetLastAccessTime("inspection", origdate)
I'm trying to save a files save date, modify that file and then restore the file back to it's original date. I can't get it to work, I've tried it several ways and cannot get it to work.
My code so far is
VB.NET:
' changing file content here
System.IO.File.SetLastAccessTime("inspection", origdate)
VB.NET: