
意思就是文件夹。Files 集合 描述在一个文件夹内的所有 File 对象的集合。说明下面的代码举例说明了如何获得一个 Files 集合,以及如何用 For Each...Next 语句来访问这个集合中的每个File:Sub ShowFolderList(folderspec)Dim fs, f, f1, fc, sSet fs = CreateObject("Scripting.FileSystemObject")Set f = fs.GetFolder(folderspec)Set fc = f.FilesFor Each f1 in fcs = s & f1.names = s & vbCrLfNextMsgBox sEnd Sub
