I am quite new to the scripting lark and i have come up with the below after reading through the posts, All i need to do is test if the date in the file is older than 2 weeks.
The below does not appear to work but i believe its Close, Any ideas?

code:
$CurDefDate = ReadProfileString ("c:\program files\common files\symantec shared\virusdefs\definfo.dat", "DefDates", "CurDefs" )

; The above file contains :

; [DefDates]
;CurDefs=20030326.002
;LastDefs=20030319.002

code:
$FileYear = ltrim (SubStr($CurDefDate, 1, 4))
$FileMonth = ltrim (SubStr($CurDefDate, 5, 2))
$FileDay = ltrim (SubStr($CurDefDate, 7, 2))
$DefDates = "$FileYear$FileMonth$FileDay"

$FileDate = SubStr($DefDates,1,10)
?$FileDate

$NowYear = @YEAR
$NowMonth = @MONTHNO
$NowDate = @MDAYNO

If $FileYear <> $NowYear
$NowMonth = $NowMonth + (12 * ($NowYear - $FileYear))
EndIf

If $FileMonth <> $NowMonth
$NowDate = $NowDate + 30
EndIf
If ($NowDate - $FileDate) > 10
? "File older than 2 weeks"
Else
? "File newer than 2 weeks"
EndIf

_________________________
Currently on : KiXtart 95 3.60