ASPDateLastModified Property
Last Updated :
31 Mar, 2021
The ASP DateLastModified Property is used to get the date and time when the particular file or folder was last modified or update on the system.
Syntax:
FileObject.DateLastModified
FolderObject.DateLastModified
Example-1: Below code demonstrates the ASP File.DateLastModified Property.
ASP
<%
dim gfg,f
set gfg=Server.CreateObject( "Scripting.FileSystemObject" )
set f=gfg.GetFile( "c:\test.txt" )
Response.Write( "File was last modified on: " )
Response.Write(f.DateLastModified)
set f=nothing
set gfg=nothing
%>
|
Output:
File last modified on: 1/10/2020 10:01:19 AM
Example-2: Below code demonstrates the ASP Folder.DateLastModified Property.
ASP
<%
dim gfg,fo
set gfg=Server.CreateObject( "Scripting.FileSystemObject" )
set fo=gfg.GetFolder( "d:\GFG" )
Response.Write( "Folder last modified on: " )
Response.Write(fo.DateLastModified)
set fo=nothing
set gfg=nothing
%>
|
Output:
Folder last modified on: 1/10/2020 10:01:19 AM
Share your thoughts in the comments
Please Login to comment...