here is another way...

needs the UDF's
DirPlus()
TimeConvert()
FlipCTime()

Code:

Call 'g:\kix\udf\dirplus\dirplus.kix'
Call 'g:\kix\udf\TimeConvert\TimeConvert.kix'
Call 'g:\kix\udf\FlipcTime\flipcTime.kix'

$files = Dirplus('\\flag-fs01\sys\deltemp','/a-d')
$3days = 259200

For Each $file In $files
$ts = Split($file.DateLastModified)
$ts[0] = Split($ts[0],"/")
$ts[0] = $ts[0][2] + '/' + $ts[0][0] + '/' + $ts[0][1]
$ts[1] = timeconvert($ts[1]+" "+$ts[2])

If flipctime(@DATE,@TIME) - flipctime($ts[0],$ts[1]) >= $3days
? "Delete! " $file.name " " $ts[0]

; --this needs to be commented out--
;$file.delete

EndIf
Next



Edited by Bryce (2005-03-28 10:49 PM)