Dim fileCount
Set fso =CreateObject("scripting.filesystemobject")
set folderOBJ = fso.GetFolder("c:\myfolder")
fileCount = folderOBJ.Files.Count
For i = 0 to fileCount -1
msgbox folderOBJ.Files.Item(i).name
Next
错在那 求赐教!!!小弟新手一枚!!
Set fso =CreateObject("scripting.filesystemobject")
set folderOBJ = fso.GetFolder("D:\myfolder")
set fileName=folderOBJ.Files
For Each f in fileName
s = f.name
msgbox s
Next