[AccessD] XP - File Date

Joseph O'Connell joconnell at indy.rr.com
Thu May 29 10:48:37 CDT 2003


Judy,

This function will return both the creation date/time and the modify date/time.

Joe O'Connell
joconnell at indy.rr.com


Public Function ReturnFileDates(ByVal strFullPath As String, _
                                                ByRef dtmCreateDate As Date, _
                                                ByRef dtmModifyDate As Date) As Boolean
    Dim objFileSystem As Object
    Dim varFileInfo As Variant
    On Error Resume Next
    Set objFileSystem = CreateObject("Scripting.FileSystemObject")
    Set varFileInfo = objFileSystem.GetFile(strFullPath)
    If Err.Number = 0 Then
        ReturnFileDates = True
        dtmModifyDate = varFileInfo.DateLastModified
        dtmCreateDate = varFileInfo.DateCreated
    Else
        ReturnFileDates = False
    End If
    Err.Clear
End Function



    -----Original Message-----
    From: Judy Johnson <jjwrite at earthlink.net>
    To: AccessD <accessd at databaseadvisors.com>
    Date: Thursday, May 29, 2003 7:28 AM
    Subject: [AccessD] XP - File Date
    
    

    Is there a way to obtain the last modified date on a text file and display it in a message box? I have a process that must be run every month but only after a file has been updated. We don't want the process to run automatically, we want user intervention but want to make sure the file is the latest one. We've gone to a Citrix server and the users no longer have explorer capabilities (corporate decision).
    
    Thanks.
    
    Judy Johnson
    jjwrite at earthlink.net
    860-482-8651
    860-309-2484 (cell)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030529/8584aacd/attachment-0001.html>


More information about the AccessD mailing list