用asp实现的获取文件夹中文件的个数的代码


复制代码 代码如下:

'返回指定文件夹中文件的数目,传入值为被检测文件夹的硬盘绝对路径
function CountFilesNumber(folderspec)
Dim objfso,f,fc
Set objfso=CreateObject("Scripting.FileSystemObject")
Set f=objfso.GetFolder(folderspec)
Set fc=f.Files
CountFilesNumber=fc.Count
set fc=nothing
set f=nothing
set objfso=nothing
End Function

« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3