VBS 遍历文件夹下所有Excel文件
Function FilesTree(sPath)
Dim i : i=0
on error resume Next
Set oFso = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFso.GetFolder(sPath)
Set oFiles = oFolder.Files
For Each oFile In oFiles
If Right(oFile.Path,3)="xls" Then
Msgbox oFile.Path
i=i+1
End If
Next
Msgbox "您的"&sPath&"目录下,一共存在"&i&"个Excle文件"
Wscript.Quit
End Function
如果你對現在不滿意...否則你就好好學,因爲你還只是菜鳥...

浙公网安备 33010602011771号