ASP GetFile 方法
asp getfile 方法

getfile 方法返回指定路徑的 file 對象。
語法
filesystemobject.getfile(path)
參數 | 描述 |
---|---|
path | 必需的。指向具體文件的路徑。 |
實例
<%
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test\test.htm")
response.write("the file was last modified on: ")
response.write(f.datelastmodified)
set f=nothing
set fs=nothing
%>
輸出:
the file was last modified on 01/01/20 4:23:56 am
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test\test.htm")
response.write("the file was last modified on: ")
response.write(f.datelastmodified)
set f=nothing
set fs=nothing
%>
輸出:
the file was last modified on 01/01/20 4:23:56 am
