programming-examples/asp/FilesMaths/FileDateTime Function.asp

16 lines
438 B
Plaintext
Raw Normal View History

2019-11-18 14:25:58 +01:00
<%
Private Function FileDateTime(ByVal pathname)
Dim objFSO, objFile
On Error Resume Next
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(pathname)
If Err Then
FileDateTime = Null
Else
FileDateTime = CDate( objFile.DateLastModified )
End If
Set objFile = Nothing
Set objFSO = Nothing
On Error GoTo 0
End Function
%>