Locating/Opening a file based on Date /Time modified

Hello. I am new to Eggplant and have been tasked with creating a script that will locate the most recent server log file, open in and then locate the INFO message that provides the server OS version. The problem that I have ran into is that all of the files, in the Server Logs directory, have almost identical filenames and, in some cases, there are multiple log files created per day. I had the thought to locate the file using date/time modified, but have been unsuccessful in locating the appropriate combination of commands to accomplish this. Any suggestions that the community could make would be appreciated.

Hi Clay, check out the sutinfo function and see if its helpful


You can also get the creation / modified date as part of the file properties (Docs page here)

Example code:

put the filesAndFolders in ResourcePath() into myfiles
put the “creation date” of each item of myfiles into myfileDates
put each item of myfiles where each.“creation date” is the largestValue of myfileDates into logfile

you may try this

sort files(“your path”) by the “modification date” of each
log last item of it


Thank you for the suggestions. I do not have access to my Eggplant, at my desk, but if I remember it right, I ultimately used:

put formattedTime into today
put EveryImageLocation today into FoundText
DoubleClick last item of FoundText