DaanI'm interested in that script also. Did you get a reply already?
dir | find "fileName.ext"
Set WshShell = WScript.CreateObject("WScript.Shell")
Set fsoFolder = CreateObject("Scripting.FileSystemObject")
daysSinceOldestFileModified = -1
binFoundFileType = False
Set currentFolder = fsoFolder.GetFolder("C:\Test")
Set arrFiles = currentFolder.Files
For Each currentFile in arrFiles
'Check if this is a log file
If InStrRev(currentFile.Name,".log") then
binFoundFileType = True
If DateDiff("d",currentFile.DateLastModified,Date) > daysSinceOldestFileModified then
daysSinceOldestFileModified = DateDiff("d",currentFile.DateLastModified,Date)
if False = binFoundFileType then
Wscript.Echo "Unable to find file of that type."
Wscript.Echo "It appears as if the oldest file was modified in the future."
elseif True = binFoundLogFile then
Wscript.Echo "An unknown error was encountered while checking the date of the oldest Exchange log file."