
Dim sfd As Folder
For Each sfd In fd.SubFolders
Debug.Print sfd.Path
List1.AddItem sfd.Path
ListFolder sfd ' 以 sfd 为参数,递归调用 Next
End Sub
下列是显示符合条件的文件的实例: 程序运行界面:
代码如下:
Private Sub Command1_Click()
Dim fs As New FileSystemObject
Dim fd As Folder, f As File
Dim attr As Long
' 组合文件属性值
attr = IIf(chkReadOnly.Value = 1, ReadOnly, 0) attr = attr + IIf(chkArchive.Value = 1, Archive, 0) attr = attr + IIf(chkHidden.Value = 1, Hidden, 0) attr = attr + IIf(chkSystem.Value = 1, System, 0)
List1.Clear
Set fd = fs.GetFolder("c:\")
For Each f In fd.Files
If (f.Attributes And attr) = attr Then List1.AddItem f.Name
End If
Excel-VBA操作文件四大方法之三 利用FileSystemObject对象来处理文件_IT/计算机_专业资料。Excel-VBA操作文件四大方法Excel-VBA 操作文件四大方法之三 三、利用 FileSys...
ASP 使用FileSystemObject对象_计算机软件及应用_IT/计算机_专业资料。ASP 使用 FileSystemObject 对象 在上节对 FileSystemObject 对象提供的属性和方法进行了详细介绍,...
FileSystemObject用法大全_信息与通信_工程科技_专业资料。FileSystemObject解释与方法使用FileSystemObject 文件系统对象 FSO 的英文全称是 File System Object ,这种对 ...
FileSystemObject对象应用示例 在这一讲中,我们将给出一系列便于运行的小程序,一步一步地介绍文本文件的使用方法。 例子1 创建文件夹和创建文件。 -- create-write...
操作文件(4):FileSystemObject 对象 使用 VBA 操作文件 2009 年 08 月 13 日, 1:05 下午 (4 人投票, 平均: 5.00 out of 5) FileSystemObject 对象位于 ...
Scripting.FileSystemObject对象的详细技巧指南_计算机软件及应用_IT/计算机_专业资料。VB FSO对象详解Scripting.FileSystemObject 对象的详 细技巧指南 Scripting.FileSystem...
Scripting.FileSystemObject对象_IT/计算机_专业资料。Scripting.FileSystemObject 对象 FileSystemObject 对象提供对计算机文件系统的访问,它允许我们在代码内操作文本文件、...
FileSystemObject对象_计算机软件及应用_IT/计算机_专业资料。FileSystemObject对象操作文件的方法FileSystemObject对象被用来访问服务器上的文件系统。这个对象能够处理文件...
3 一,FileSystemObject 对象的属性 ... 3 二,FileSystemObject 对象的方法 ......
FileSystemObject对象_IT/计算机_专业资料。qtpFileSystemObject 对象 FileSystemObject Provides access to a computer's file system. FileSystemObject 对象(简称 FSO 对...
热门文档