#include 'file.au3'
#include 'array.au3'
Local $sPath = @ScriptDir
Local $str = _FileListToArray($sPath, '*.*')
Local $aZZz[$str[0]][2], $zzz
For $i = 1 To $str[0]
$aZZz[$i - 1][0] = FileGetTime($sPath & $str[$i], 0, 2)
$aZZz[$i - 1][1] = $str[$i]
Next
_ArraySort($aZZz, 1)
For $i = 1 To UBound($aZZz)-1
FileDelete($sPath& $aZZz[0][1])
Next