4

I have observed that last "accessed date" of a file or folder on windows 7 does not get updated real time. It does not update even after refreshing the folder, renavigating to the folder and accessing its content and restarting the OS. How to update the "last accessed date" ?

2 Answers 2

4

According to Microsoft's documentation of the Win32 GetFileTime api:

NTFS delays updates to the last access time for a file by up to one hour after the last access. NTFS also permits last access time updates to be disabled. Last access time is not updated on NTFS volumes by default.

JanSchejbal is correct that the problem with last access times is performance, that it turns every read into an additional write. Microsoft describes how the fsutil command can be used to modify the filesystem behavior.

4
  • 1
    Is there any way to manually update ? Feb 24, 2013 at 23:01
  • Does this delay affect the displayed date? I would expect that the change is kept in memory (but not written to disk until 1 hour has passed), and when the date is requested, the in-memory value is shown. Feb 24, 2013 at 23:01
  • so you are saying it can be manually updated, right ? do you know how it can be done? Feb 24, 2013 at 23:08
  • @JohnWatson - Why do you want to know how it can manually be updated if your attempting to verify if the file has been modified? Why are you worried about people changing you file without your knowlege there are easier ways to prevent that action.
    – Ramhound
    Feb 25, 2013 at 14:10
3

The last access date has been disabled for performance purposes, as it turns every read into a write operation (source). You can use fsutil behavior set disablelastaccess 0 to enable them, but this will hurt performance.

8
  • I dont think it is disabled. I can see last access dates for all folders, only thing is that data is not updated. I am not able to understand the frequency of update by the OS. So , how to make it real time or at least update it manually? Feb 24, 2013 at 22:08
  • Disabling it means it is not updated. Existing dates are still preserved and displayed. What do you need it for? Maybe there is a better solution. Feb 24, 2013 at 22:21
  • To check if somebody has copied my data. So, if lastaccess is disabled, still system keeps the record of access date and time which can be retrieved by enabling the parameter ? Feb 24, 2013 at 22:58
  • 3
    fsutil behavior query disablelastaccess Feb 24, 2013 at 23:16
  • 1
    the value is 1. Now, this is surprising, because I can see updated last access on some folders. Any idea what is going on ? Feb 24, 2013 at 23:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .