Loop Files - Find Latest File

Loop files in a folder and find the latest file

This sample task will demonstrate how Automate can loop files in a folder and find the latest file. The task will loop through a specified folder and compare each subsequent loop with the latest file found using the FileDateTime(Name) Function.

FileDateTime(Name) returns the last modification date and time for the specified file.

The syntax for the FileDateTime function is:

FileDateTime(Name)

(Name) is the path to a file name or variable that you wish to retrieve the created or last modified date for.

Task Category:

Looping