一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

怎样判断一个盘上是否有文件

时间:2008-01-12 编辑:简简单单 来源:一聚教程网

<%
dim objfolder
dim objfso
dim j
set fso=server.CreateObject("scripting.filesystemobject")
set objfolder=fso.GetFolder("d:/")
if objfolder.size>0 then
j=0
for each objfile in objfolder.files
j=j+1
next
if j>0 then '此盘上有文件,共有j个文件
.....
else
..... '此盘上没有文件
end if
else
.... '此盘上没有文件
end if
%>

热门栏目