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