I was really afraid that was what you meant, but had to ask.
This is
100% UNTESTED, but if it's wrong it should be wrong in the details, not in the concepts.
Code:
Option Explicit
'* DEFINE CONSTANTS
Const EVENT_ERROR = 1
Const EVENT_INFORMATIONAL = 4
Const FULL = "_full.xml"
Const SINGLE = "_single.xml"
'* DECLARE VARIABLES
Dim objShell
Dim FSO, fldr, File
Dim fulllen, singlelen
fulllen = Len(FULL)
singlen = Len(SINGLE)
'* Set environment and open output file
' why do you create this until you need it?
Set objShell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set fldr = FSO.GetFolder("c:\test")
Dim matchfull, matchsingle
matchfull = False
matchsingle = False
For Each file In fldr.Files
If Not matchfull Then
If Right(LCase(file.Name),fullen) = FULL Then
matchfull = ( DateDiff("s",File.DateLastModified,Now()) <= 300 )
End If
End If
If Not matchsingle Then
If Right(LCase(file.Name),singlelen) = SINGLE Then
matchsingle = ( DateDiff("s",File.DateLastModified,Now()) <= 300 )
End If
End If
If matchfull AND matchsingle Then Exit For ' no point in continuing
Next
If ( Not matchfull ) AND ( Not matchsingle ) Then
objShell.LogEvent EVENT_ERROR, "One or both files have not been written to within the last 5 minutes"
End if
'
'