Submitted By: Anders Bengtsson

Checks for .ERR files in a specified folder.

Visual Basic
Edit|Remove
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.getfolder("C:\")
For Each File in Folder.Files
If fso.GetExtensionName(File)="err" Then

Const EVENT_WARNING = 2
Set objShell = CreateObject("Wscript.Shell")
objShell.LogEvent EVENT_WARNING, _
"There are error files in " & folder
End If
Next