take a look at the UDF's DIRPlus() and FlipCTime() and TimeConvert().
ahh... waht the hell... silver platter time 
Code:
Call 'g:\kix\udf\dirplus\DirPlus.kix'
Call 'g:\kix\udf\FlipcTime\flipcTime.kix'
Call 'g:\kix\udf\TimeConvert\TimeConvert.kix'
DIM $DeletedFiles[0]
;get and array of all file on the folder
$files = Dirplus("c:\temp",'/a-d /s')
for each $file in $files
;the current date/time of the file
$TS = split($file.datelastmodified)
;need to format the date/time into usable values
;this tunes the time in to Milltary time
$ts[1] = timeconvert($ts[1]+$ts[2])
;this puts the date into a yyyy/mm/dd format
$ts[0] = split($ts[0],'/')
$ts[0] = $ts[0][2]+'/'+$ts[0][0]+'/'+$ts[0][1]
;the age of the file in seconds since 1970/1/1
$ts = flipctime($ts[0],$ts[1])
;the current number of seconds since 1970/1/1
$currentTime = flipctime(@DATE,@TIME)
;Check to the the number of seconds that have elapsed since the .lastdatemodified time on the file
;of longer than 24hours or 86400 seconds, the file is old enough.
If $currentTime - $ts > 86400
;add the wanted information to the $deletedFiles Array
$deletedFiles[ubound($deletedFiles)] = $file
;resize the array by 1
redim preserve $deletedFiles[ubound($DeletedFiles)+1]
EndIf
next
If ubound($deletedFiles) > 0
;need to trim down the size of the array by one.
redim preserve $deletedFiles[ubound($deletedFiles)-1]
Else
;no files were found that were older than 1 day
$deletedFiles=0
EndIf
"Number of Files that are older than 1 day = " + (ubound($DeletedFiles)+1)
;add up the size of the files to be deleted
for each $file in $DeletedFiles
$deletedFileSize = $file.size+$deletedFileSize
next
? "Total Size of files to be deleted = " $deletedFileSize
;time to delete the files, you will neede to uncomment this...
;because it WILL delete the files!!
;for each $file in $deletedFiles
; $file.delete
;next