When writing an error logging component for one of my applications, I initially performed my file maintenance based on the last time the log file was accessed (by file maintenance, I mean deleting old or unused files). If a file was older than X days, and had not been accessed within the last X days, then I would delete it. However, I noticed that none of my files were being deleted. When I looked at the accessed property, it would indicate that the file(s) had been accessed within the last 24 hours. When cross-referencing the time frame of the date/time stamp on these files with the scheduled time for my virus scan, I noticed that there was considerable overlap.
Since there seem to be no other scheduled tasks running in this same time frame, I have to assume that the virus scan software is causing this. However, before I go and modify my logging component, I would like to be sure (because my end user really wants the ability to look at a particular subset of older log files, and the accessed property was the simplest method to achieve this functionality).
Sorry for the long explanation, as well as the delayed response. Hope this helps.
Main Topics
Browse All Topics





by: warturtlePosted on 2009-08-10 at 14:58:11ID: 25064475
Hello,
Can I ask why would you like to find out if the files have been marked as accessed?? As far as I understand, if you are scanning your computer and pause the scanner and then resume the scan again. The scanner will remember the last file scanned and will continue from the same point instead of starting the scan again from first file.