MasterRacker
New member
I'm scripting a check to see if processes have run by looking at folders of log files to see if the most recent file is less than X days old.
This should do what I want
Potentially I could end up looping through the whole collection. Is there any more efficient way to find the most recent file?
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
This should do what I want
Code:
statusOK = 0
For Each currFile In srcFolder.files
If DateDiff("d", currFile.DateLastModified, Now) <= CInt (age) Then
statusOK = 1
Exit For
End If
Next
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]