I have a MS Access (2003) DB that depends on updates from an external .csv file. I would also like to find and display the DateLastModified Property of that external file. I will display this date in a message box that tells the users what date the external data (.csv) was last updated. The external file (.csv) is located on a server. Let's say: server \\xxx-xx-###\xxxxx_xxxxx\Data Links\BFMreset.csv
Is this the proper VB to use and how would I set it up. Please be specific with my server/file example above.
From VB Help I am looking at:
DateLastModified Property
Description
Returns the date and time that the specified file or folder was last modified. Read-only.
Syntax
object.DateLastModified
The object is always a File or Folder object.
Remarks
The following code illustrates the use of the DateLastModified property with a file:
Sub ShowFileAccessInfo(filespec)
Dim fs, f, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
s = UCase(filespec) & vbCrLf
s = s & "Created: " & f.DateCreated & vbCrLf
s = s & "Last Accessed: " & f.DateLastAccessed & vbCrLf
s = s & "Last Modified: " & f.DateLastModified
MsgBox s, 0, "File Access Info"
End Sub
Thanks,
Is this the proper VB to use and how would I set it up. Please be specific with my server/file example above.
From VB Help I am looking at:
DateLastModified Property
Description
Returns the date and time that the specified file or folder was last modified. Read-only.
Syntax
object.DateLastModified
The object is always a File or Folder object.
Remarks
The following code illustrates the use of the DateLastModified property with a file:
Sub ShowFileAccessInfo(filespec)
Dim fs, f, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
s = UCase(filespec) & vbCrLf
s = s & "Created: " & f.DateCreated & vbCrLf
s = s & "Last Accessed: " & f.DateLastAccessed & vbCrLf
s = s & "Last Modified: " & f.DateLastModified
MsgBox s, 0, "File Access Info"
End Sub
Thanks,