ASP Display File/Page Access Date & Time

 

This script will display the time and date of when a file/page was last accessed.

 

Example

This page was last accessed on the: 29/07/2010 01:30:16  

 

 

Script Source

<%
dim fs, f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile(Server.MapPath("asp_access_time.asp"))
Response.Write("This page was last accessed on the: " & f.DateLastAccessed)
set f=nothing
set fs=nothing
%>

 

Please let me know if this script was helpful to you.

[rating]