A] Under Authoring > Monitors, create a new Timed Two State Monitor. Give it a name, schedule, target and description
B] Copy this script into the 'Script Window':
Dim oAPI, oBag
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFile = "C:\Test.txt"
If objFSO.FileExists(strFile) Then
Call oBag.AddValue("Status","Ok")
Call oAPI.Return(oBag)
Else
Call oBag.AddValue("Status","Error")
Call oAPI.Return(oBag)
End If
Check that the quote marks are correct - i.e. straight down ones rather than the curly sort!
C] Configure the Healthy/Unhealthy experssions as needed. Use the Parameter name:
Property[@Name='Status']
then enter the Value depenging on which way round you need things
D] Configure the alerting bit of the Monitor and you're all done