ASP DateLastAccessed 屬性
asp datelastaccessed 屬性

datelastaccessed 屬性用于返回指定文件或文件夾最后被訪問的日期和時間。
語法
fileobject.datelastaccessed
folderobject.datelastaccessed
folderobject.datelastaccessed
針對 file 對象的實例
<%
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test.txt")
response.write("file last accessed on: ")
response.write(f.datelastaccessed)
set f=nothing
set fs=nothing
%>
輸出:
file last accessed on: 10/29/2001 10:21:23 am
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test.txt")
response.write("file last accessed on: ")
response.write(f.datelastaccessed)
set f=nothing
set fs=nothing
%>
輸出:
file last accessed on: 10/29/2001 10:21:23 am
針對 folder 對象的實例
<%
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
%>
輸出:
folder last accessed on: 9/19/2001 10:01:19 am
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
%>
輸出:
folder last accessed on: 9/19/2001 10:01:19 am

相關(guān)文章
- ASP Cookies
- ASP Request 對象
- ASP AtEndOfStream 屬性
- ASP Drive 屬性
- ASP ParentFolder 屬性
- ASP Size 屬性
- ASP Count 屬性
- ASP Add 方法
- ASP RemoveAll 方法
- ASP Cookies 集合
- ASP Flush 方法
- ASP Redirect 方法
- ASP QueryString 集合
- ASP Contents.RemoveAll 方法
- ASP Application_OnStart 和 Application_OnEnd 事件
- ASP CodePage 屬性
- ASP CopyFile 方法
- ASP GetBaseName 方法
- ASP GetParentFolderName 方法
- ASP OpenTextFile 方法