读书人

检查一个文件夹包含多少个文件解决方法

发布时间: 2013-01-26 13:47:02 作者: rapoo

检查一个文件夹包含多少个文件
我想用VB检查一个文件夹包含多少个文件!!!如何实现!诚请各位高手指教!谢谢!!
[解决办法]
在工程中引用ms scripting runtime

Private Sub Command1_Click()
Dim fso As New Scripting.FileSystemObject
Dim f As Folder

Set f = fso.GetFolder(PathNmae)
Debug.Print f.Files.Count
End Sub

读书人网 >VB

热点推荐