Thnax Lonkero......

It worked..... I was doing a mistake that I was changing the file name too with two @@ (dump ass [Mad] ) now it worked.

now if we go back back to old cord

code:
 
$dt1=@date
$x1 = SubStr($dt1, Len($dt1) - 9, 4)
$x2 = SubStr($dt1, Len($dt1) - 4, 2)
$x3 = SubStr($dt1, Len($dt1) - 1, 2)
$result=$x1 + $x2 + $x3
$sub=Val($result)
$sub1=$sub-7
$dr=Dir("f:\")
While $dr <> "" AND @error = 0
$dt=GetFileTime ("f:\$dr")
? $dr
? $dt
$dttrm=Left("$dt",10)
$y1 = SubStr($dttrm, Len($dttrm) - 9, 4)
$y2 = SubStr($dttrm, Len($dttrm) - 4, 2)
$y3 = SubStr($dttrm, Len($dttrm) - 1, 2)
$result1=$y1 + $y2 + $y3
If ($sub1 > $result1)
;Del "\\mosaic01mz\eventlog\$dr"
;? "less than 7 exist"
EndIf
$DR=Dir()
Loop

I think I have to add that extra "@" to
code:
 $dt=GetFileTime ("f:\$dr") 

here somewhere right ?
_________________________
“I’ll not change you unless you don’t have intention to change yourself” --H:Quran