Files_FoundHours

Listing the file from a folder that was created during last few hours.
Can pass folder to search in and the hour numbers.
Needs FSO object already defined.

CodeFunctionName
What is this?

Public

Tested

Original Work
Function Files_FoundHours(InFolder, HoursBack)
    Rett                        = ""
    Set folder                 = fso.GetFolder(InFolder)
    For Each Fi in folder.Files
        If DateDiff("h", Fi.DateCreated, Now) <= HoursBack Then
            Rett                = InFolder & "\" & Fi.Name
            Exit For
        End If
    Next
    Files_FoundHours    = Rett
End Function

SystNo, OrderID, HoursBack

Views 474

Downloads 50

CodeID
DB ID