ASP GetFolder 方法
ASP GetFolder 方法用于返回与指定路径的文件夹对应的文件夹对象。它是 FileSysten 对象的内置方法。
句法:
FileSystemObject.GetFolder(path)
参数值:
- 路径:这是一个必需的属性。它指定指定文件夹的路径。
示例 1:下面的示例说明了 ASP GetFolder 方法。
ASP
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFolder("d:\hello\")
Response.Write("The folder was last modified on: ")
Response.Write(f.DateLastModified)
set f=nothing
set fs=nothing
%>
ASP
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFolder("C:\Folder1\A")
Response.Write("The folder was last modified on: ")
Response.Write(f.DateLastModified)
set f=nothing
set fs=nothing
%>
输出:
The folder was last modified on 01/01/20 4:23:56 AM
示例 2:
ASP
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFolder("C:\Folder1\A")
Response.Write("The folder was last modified on: ")
Response.Write(f.DateLastModified)
set f=nothing
set fs=nothing
%>
输出:
The folder was last modified on: 2/22/2021 1:18:50 PM