校庆10周年手抄报:ASP高手看过来!
来源:百度文库 编辑:杭州交通信息网 时间:2024/05/08 11:16:39
有一段代码如下:
<%
dim fso,f,fc,f1,path
path = "uploadfile/photo/"
Set fso=Server.CreateObject("scripting.FileSystemObject")
set f=fso.GetFolder(Server.MapPath(path))
Set fc = f.files
for each f1 in fc
response.write f1.name &"<br>
response.write f1.size
next
set fc=nothing
set f=nothing
set fso=nothing
set path=nothing
%>
输出的结果分别是文件夹“uploadfile/photo/”里的文件名及文件大小,现在我想获取该文件夹的文件数量及每个文件的创建时间,这个该怎么写呢?
<%
dim fso,f,fc,f1,path
path = "uploadfile/photo/"
Set fso=Server.CreateObject("scripting.FileSystemObject")
set f=fso.GetFolder(Server.MapPath(path))
Set fc = f.files
for each f1 in fc
response.write f1.name &"<br>
response.write f1.size
next
set fc=nothing
set f=nothing
set fso=nothing
set path=nothing
%>
输出的结果分别是文件夹“uploadfile/photo/”里的文件名及文件大小,现在我想获取该文件夹的文件数量及每个文件的创建时间,这个该怎么写呢?
f1.DateCreated 这个是创建时间参数.
个数好像没有直接参数.
数量 UBOUND(fc )看看行不行
创建时间f1.DateCreated