SetFileTime

The SetFileTime function sets the date and time that a file was created, last accessed, or last modified.

SetDrawColor sFileName,dCreation,dModify,dAccess

Parameters

sFileName
Specifies the name of the file to change the date for.

dCreation
Datetime variable specifying the creation time. If do not want to change this time, you should set this parameter to False.

dModify
Datetime variable specifying the last modification time. If do not want to change this time, you should set this parameter to False.

dAccess
Datetime variable specifying the last access time. If do not want to change this time, you should set this parameter to False.

Return value

The function returns True if successful, otherwise False.

Remarks

The function can be used in the case then creating a picture requires a lot of time. It can happen, for example, when your script makes a preview of big OLE document. In this case you can use filetime to check if modifications was made.

Example
The following example shows how to set the file creation time to 20 January 2001 14 hours 15 minutes 16 seconds.

.............................
set obj=CreateObject("shotgraph.image")

cre_date=DateSerial(2001,1,20)+TimeValue("14:15:16")
obj.SetFileTime "c:\document.txt",cre_date,False,False
.............................