For Each $File in $Files
; TimeDiff - calculate time between two date/time values
; Arg 1: Start Date/Time
; Arg 2: End Date - use "now" for calculating age to the minute, "today" to calculate on today's date only
; Arg 3: 1 char value to return time in Minutes, Hours, Days, or Years
; Arg 4: (not used here) Calculate difference to ms instead of seconds
$Years = TimeDiff(getfiletime($File),1,10), 'today', 'y')
SELECT
; work in reverse age order
Case $Years > 5 ; OLD!
REDIM PRESERVE $aOld[1+UBOUND($aOld)]
$aOld[UBOUND($aOld)] = $File
Case $Years >= 4 ;
REDIM PRESERVE $a4Years[1+UBOUND($a4Years)]
$a4Years[UBOUND($a4Years)] = $File
Case $Years >= 3
REDIM PRESERVE $a3Years[1+UBOUND($a3Years)]
$a3Years[UBOUND($a3Years)] = $File
Case $Years >= 2
REDIM PRESERVE $a2Years[1+UBOUND($a2Years)]
$a2Years[UBOUND($a2Years)] = $File
Case $Years >= 1
REDIM PRESERVE $a1Year[1+UBOUND($a1Year)]
$a1Year[UBOUND($a1Year)] = $File
Case 1
REDIM PRESERVE $aRecent[1+UBOUND($aRecent)]
$aRecent[UBOUND($aRecent)] = $File
EndSelect
Next