
alter directory modification date
Hi,
Does anybody know how to change a directory's modification date?
Here is the code(partial) for modifying a file. Is it just matter of
obtaining a handle for directory instead of a file? If so, how do I get
the handle for a directory.
Private Sub changetime()
Dim hFile As Long
Dim fName As String
Dim tmp As String
Dim OFS As OFSTRUCT
Dim SYS_TIME As SYSTEMTIME
Dim FT_CREATE As FILETIME
Dim FT_ACCESS As FILETIME
Dim FT_WRITE As FILETIME
Dim NEW_TIME As FILETIME
fName = (txtFileName)
hFile = OpenFile(fName, OFS, OF_READWRITE)
MsgBox OFS.nErrCode
If hFile Then
GetSystemTime SYS_TIME
Call SystemTimeToFileTime(SYS_TIME, NEW_TIME)
Call SetFileTime(hFile, NEW_TIME, NEW_TIME, NEW_TIME)
End If
Call CloseHandle(hFile)
End Sub
-
Phil
Sent via Deja.com http://www.*-*-*.com/
Before you buy.