ASP GetFileMethod


FileSystemObject 对象参考手册Complete FileSystemObject Object Reference Manual

The GetFile method returns a File object for the specified path.

Syntax

FileSystemObject.GetFile(path)

Parameters Description
path Required. The path to the specific file.

Example

<%
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
%>

Output:

The file was last modified on 01/01/20 4:23:56 AM


FileSystemObject 对象参考手册Complete FileSystemObject Object Reference Manual Other Extensions