Get the DIRPLUS(http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=12;t=000027) and BSORT(http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=12;t=000070) UDFs from the UDF section.

Read the appropriate list of files into an array so you end up with
code:
$filearray[0]='sdat4194.exe'
$filearray[1]='sdat4195.exe'

Then sort the array, by default the filename with the lowest number will be $filearray[0] and the filename with the highest number will be $filearray[ubound($filearray)]
code:
$filearray=dirplus('c:\temp','sdat*.exe')
$filearray=bsort($filearray)
$newestfile=$filearray[ubound($filearray)]



[ 11 April 2002, 15:27: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.