-
I know how to get different dates from files, but is there a way of setting a date / time in a file??
Reading is easy:
Set FSO = CreateObject("Scripting.FileSystemObject")
Set FSOf = FSO.GetFile(fFile)
MsgBox FSOf.datecreated
MsgBox FSOf.datelastmodified
MsgBox FOSf.DateLastAccessed
BUT how do I write into the date:
FSOf.DateCreated = "12/12/2000 12:12:12" ???
Thanks. Chris
-
maybe...?
Code:
x = Date()
y = Time()
Time = *timeyouwant*
Date = *dateyouwant*
'make file...
Time = y
Date = x
hope, it helped.
-
Thanks, but thats cheating!
I don't think I will be able to do it that way, as the file might not be on my own PC.... And even if it is, some of my users wont have permission to change the date / time on their (NT) systems.
Chris
-
You can set the time & date of a file to whatever you want with the SETFILETIME Api call found at : http://www.vbapi.com/ref/s/setfiletime.html :)
-