Declaration
function GetFirstFile(const Path: String; GetFiles: boolean = True; GetDirs: boolean = False; AllowHidden : Boolean = False);
Description
Returns the first file in the specified path.
Path must include a wildcard, e.g. '.\*.jpeg' or 'C:\Images\*.*'
Note:
◼Result INCLUDES the path
◼Result is NOT guaranteed to be the first file alphabetically, just the earliest file in the folder
Also see:
GetAllFiles// Load first JPEG image in C:\Images
ImageEnView1.IO.LoadFromFile( GetFirstFile( 'C:\Images\*.jp*' ));