用asp实现的获取文件夹中文件的个数的代码
2026-01-17 14:44:52 作者:用户投稿
复制代码 代码如下:
'返回指定文件夹中文件的数目,传入值为被检测文件夹的硬盘绝对路径
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
'返回指定文件夹中文件的数目,传入值为被检测文件夹的硬盘绝对路径
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
联络方式:
4008905355
邮箱:9196886@qq.com
Q Q:9196886
微信二维码
