常用工具: 网吧管理 | 手机工具 | 上网必备 | 图像处理 | 视频工具 | 音频工具 | MSN 专区 | 办公软件 | 行政管理 | 商业贸易 | 股票彩票
黑客软件: 入侵攻击 | 木马病毒 | 游戏外挂 | 密码破解 | 探嗅监听 | 漏洞扫描 | 在线视频 | 远程控制 | 其它黑软 | 加密解密 | 漏洞利用
新闻文章: 安全报告 | 西盟新闻 | 工具介绍 | 网络安全 | OICQ秘籍 | 免费资源 | 菜鸟文摘 | 数据安全 | 最近更新 | RSS订阅 | 菜鸟编程
 西盟网络(ZmKe.CoM)成立于2006年,经过数年发展已成为国内知名IT门户及知名域名空间运营商.我们将坚持创新.打造一流网络平台! |
经常需要的代码,发出来给大家参考一下!
'sPath是所查找的文件夹的路径,list是返回的文件列表
Public Function GetAllFiles(ByVal sPath As String, list As Collection)
Dim item As String
Dim oPaths As New Collection
item = Dir(sPath, vbDirectory)
While Len(item) > 0
If item <> "." And item <> ".." Then
If (GetAttr(FullPathName(sPath) & item) And vbDirectory) = vbDirectory Then
oPaths.Add item
Else
If IsModelFile(item) Then list.Add sPath & item
End If
End If
item = Dir
Wend
Dim p
For Each p In oPaths
Call GetAllFiles(Combin(sPath, p), list)
Next
End Function
'判断文件夹后是否有\
Public Function FullPathName(ByVal strPath As String) As String
FullPathName = IIf(VBA.Right(strPath, 1) = "\", strPath, strPath & "\")
End Function
'多个文件夹名组成路径
Public Function Combin(ParamArray arg()) As String
Dim X
Dim result As String
For Each X In arg()
result = result & FullPathName(X)
Next
Combin = result
End Function
请遵守国家法律和互联网法规。
· 您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任.
· 留言板管理人员有权保留或删除其管辖留言中的任意内容.
· 本站提醒:不要进行人身攻击与无聊谩骂。谢谢配合!
注意:系统启用了静态/缓存功能,您的回复可能不能立即显示。