ASP FSO datelastaccessed and FSO DateLastModified properties Let's take a look at the DateLastModified instance first.
The DateLastModified property is used to return the last modification of the file or folder specified by the date and time.
Grammar
Fileobject.datelastmodified
Folderobject.datelastmodified
<%
Dim fs,f
Set Fs=server.createobject ("Scripting.FileSystemObject")
Set F=FS. GetFile ("C:test.txt")
Response.Write ("File Last Modified on:")
Response.Write (f.datelastmodified)
Set f=nothing
Set fs=nothing
%>
Output:
File Last modified on:1/10/2001 10:01:19 AM
This is also the same method for working with folders. Let's look at the FileSystemObject datalastaccessed attribute instance.
The Datelastaccessed property is used to return the last access to a file or folder specified by the date and time. Grammar fileobject.datelastaccessed folderobject.datelastaccessed This we will use folder folders to test it, the same way for files Oh. <%
Dim fs,fo
Set Fs=server.createobject ("Scripting.FileSystemObject")
Set FO=FS. GetFolder ("C:test")
Response.Write ("folder last accessed on:")
Response.Write (fo. datelastaccessed)
Set fo=nothing
Set fs=nothing
%>output:folder last accessed on:9/19/2001 10:01:19 AM
ASP datelastaccessed is to determine the last access time of a file or folder and DateLastModified This is the time the file or folder was modified