Property: DateLastModified for File
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: DateLastModified for File
Property: DateLastModified for File
Specifies the last file modification date and time.
Set oDispatch = Object.DateLastModified
| Object | File Object with this property |
| oDispatch | Returned object Receives the modification date as variant value with the subtype date. |
The following example displays various file information:
Function ShowFileInfo(sFile) Dim fso, oMyFile, sOutput Set fso = CreateObject("Scripting.FileSystemObject") Set oMyFile = fso.GetFile(sFile) sOutput = "File: " & oMyFile.Name & VBCrLf sOutput = sOutput & "Created: " & oMyFile.DateCreated & VBCrLf sOutput = sOutput & "Last Accessed: " & oMyFile.DateLastAccessed & VBCrLf sOutput = sOutput & "Last Modified: " & oMyFile.DateLastModified ShowFileInfo = sOutput End Function