programming-examples/asp/More_Code_Snippets/This snippet shows how to display when a file was last accessed.asp
2019-11-18 14:25:58 +01:00

12 lines
390 B
Plaintext

<%
'declare our variables
Dim objFSO , myFile
'create instances of the objects
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set myFile = objFSO.GetFile(Server.MapPath("sample.txt"))
'display information
Response.Write "The file was last accessed on " & myFile.DateLastAccessed
'delete our object variables
Set objFSO = Nothing
Set myFile = nothing
%>