#DEFINE FILE_FLAG_BACKUP_SEMANTICS 0x02000000
Second, change the line of code reading:This.nFileHandle = CreateFile(@lcfilename, pnMode,; lnaccess, 0, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, 0)to
IF NOT DIRECTORY(lcfilename, 1) This.nFileHandle = CreateFile(@lcfilename, pnMode,; lnaccess, 0, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, 0) ELSE This.nFileHandle = CreateFile(@lcfilename, pnMode,; lnaccess, 0, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING + FILE_FLAG_BACKUP_SEMANTICS, 0) ENDIFthis is in the OpenFile function of the of the class. Then to change the date last modified time stamp
SET PROCEDURE TO FileTime.prg oTimes = CREATEOBJECT("FileTimes") IF oTimes.SetFileTime("C:\Your_Dir\", , , DATETIME()) * Success! ENDIF