Enable Last Access timestamp for files and folder in Windows

Source:www.opentechguides.com | Date Published: 2017-01-09 21:43:21

Last access timestamp of a file is the last date and time when that file was opened for reading or writing. So every time a user access a file this timestamp needs to be updated, which is a bit of an overhead especially if you are not too keen on this file attribute. To improve the performance of NTFS filesystem in Windows 10 (and previous versions starting from Windows Vista) the last access times of files and directories are NOT updated.

Let's try this

So why do we still need the accessed time attribute if its not being updated? Lets say you have a backup application that backsup files that are accessed after a specified date or an archiving software which moves all files that are not accessed in the last six months to a secondary storage location. Such applications need to know accurate last accessed time of your files. In this case you can enable updating the last access time using fsutil tool.

fsutil is a command line tool to perform task related to NTFS and FAT filesystems. fsutil command can query and also set the NTFS volume behavior parameter DisableLastAccess which controls whether access times are updated or not.

Commands to Enable, disable and query last access time updates

Open an elevated command prompt. Right click Windows Start button and select Command Prompt (Admin). To check the Last access time updates are enabled or not, run:

C:\> fsutil behavior query disablelastaccess
DisableLastAccess = 1

To enable Last access time update:

C:\> fsutil behavior set disablelastaccess 0
DisableLastAccess = 0

To disbale Last access time update:

C:\> fsutil behavior set disablelastaccess 1
DisableLastAccess = 1

After making any change you must restart the computer for the changes to take place.

Open Tech Guides | www.opentechguides.com