You are on page 1of 1

Option Explicit Set flsysobj = CreateObject("Scripting.FileSystemObject") src = "c:\work\wmi" Set folder = flsysobj.GetFolder(src) count = 0 For Each file In folder.

files If LCase(flsysobj.GetExtensionName(file)) = "txt" Then count = count + 1 End If Next WScript.Echo "Count: " & count

You might also like