VB6循环遍历指定文件夹目录中的所有文件并获取其名称的最简单方法是什么?
sFilename = Dir(sFoldername) Do While sFilename > "" debug.print sFilename sFilename = Dir() Loop
Dim fso As New FileSystemObject Dim fld As Folder Dim fil As File Set fld = fso.GetFolder("C:\My Folder") For Each fil In fld.Files Debug.Print fil.Name Next Set fil = Nothing Set fld = Nothing Set fso = Nothing