On Error Resume Next
Dim fso, StdOut, folders, files, ext
folders = Array(_
"c:\",_
"c:\users"_
)
ext = ".xml"
Set fso = CreateObject("Scripting.FileSystemObject")
Set StdOut = fso.GetStandardStream (1)
StdOut.WriteLine ""
StdOut.WriteLine ""
StdOut.WriteLine "** Testing for XMLs:"
StdOut.WriteLine ""
StdOut.WriteLine ""
For each sFolder In folders
Set files = fso.GetFolder(sFolder).Files
For each folderIdx In files
If InStr(folderIdx.name, ".xml") > 0 Then
StdOut.WriteLine " > " + ext + " found in " + sFolder
End If
Next
Next
StdOut.WriteLine ""
StdOut.WriteLine ""
StdOut.WriteLine "** Tested all Dirs."
Wscript.Quit