I have a script that loops through a folder and gets the one with last modified date which works great. I need to add some functionality to it and I am not sure how.
This is what I currently am using
Set fo = CreateObject("scripting.filesystemobject")
Set fl = fo.GetFolder("C:\MyFolder")
For Each f In fl.Files
If f.DateLastModified > maxDt Then
maxDt = f.DateLastModified
Set myFile = f
Lets say I have the following files in that Folder:
So in this example the Joe_329.txt has the last modified date, but say I want to get the last modified "Bob" file. I am not sure how to incorporate a wildcard search with my current script.