ASP DateLastAccessed 属性
DateLastAccessed 属性用于返回指定文件或文件夹最后被访问的日期和时间。
语法
1 | <div> FileObject.DateLastAccessed<br><br> FolderObject.DateLastAccessed </div>
|
针对 File 对象的实例
1 | <div> <%<br> dim fs,f<br> set fs=Server.CreateObject( "Scripting.FileSystemObject" )<br> set f=fs.GetFile( "c:\test.txt" )<br> Response.Write( "File last accessed on: " )<br> Response.Write(f.DateLastAccessed)<br> set f=nothing<br> set fs=nothing<br> %><br><br> 输出:<br><br> File last accessed on: 10/29/2001 10:21:23 AM </div>
|
针对 Folder 对象的实例
1 | <div> <%<br> dim fs,fo<br> set fs=Server.CreateObject( "Scripting.FileSystemObject" )<br> set fo=fs.GetFolder( "c:\test" )<br> Response.Write( "Folder last accessed on: " )<br> Response.Write(fo.DateLastAccessed)<br> set fo=nothing<br> set fs=nothing<br> %><br><br> 输出:<br><br> Folder last accessed on: 9/19/2001 10:01:19 AM </div>
|