(imported topic written by JMaple1)
So I’m trying to create an analysis to use within web reports that will increment on a daily basis for checking the most recent virus definitions. The increment will be tied to the modification time of a file. Here is what I want it to do.
- It will grab what day the file was last modified on
- It will take that and compare it to day of today
- The result will increment how many days old the file is from today
First of all, is it possible? I imagine it is because it seems like simple arithmetic but obviously there are syntax issues with grabbing the date in the format I need. Here is what I have so far:
if (name of operating system contains “Win”) then if (exists file “C:\ProgramData\Symantec\Definitions\VirusDefs\definfo.dat” ) then if (now - modification time of file “C:\ProgramData\Symantec\Definitions\VirusDefs\definfo.dat” < 1*day) then now - modification time of file “C:\ProgramData\Symantec\Definitions\VirusDefs\definfo.dat” & " Days Old" else “Up-to-date” else “File Does Not Exist” else “Not Applicable”
Obviously this does not work but I wonder if I’m trying to do this a much harder way than it has to be?