alter directory modification date 
Author Message
 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.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. alter directory modification date

2. Visual Basic 2008 and Active Directory computer description modifications

3. Record modification date information?

4. Modification to Time and Date stamp needed

5. Halp - Modification date

6. Custom Form Date Modification Error.

7. File Modification Date/Time - grabbing and setting

8. Modification date of a file

9. Date/time of last modification for an URL

10. Altering File Date and Time

11. VB - Altering File Date and Times

12. Altering dates

 

 
Powered by phpBB® Forum Software