Türkçe   |   English
Calendar
Categories
Archive
Links
Blogroll
Files

Reading Last Access Property of a File at Windows Vista and Windows 7 - 01.12.2009

If you are using Windows Vista or a higher version you'll see that Last Accessed attribute of the file does not change even if you accessed the file just before checking. This situation may cause problem in our programs that we need to get the last access property of a file using FileInfo object or the situation that we use FileSystemWatcher to get notified when file is accessed by using  NotifyFilters.LastAccess attribute.

For improved file system performance Last Access time update in switched off in Windows Vista by default. Thus, Last Access time attribute is set upon creating file and not changed afterwards even if file is modified. However, it is possible to enable Last Access time updates if necessary.
To enable Last Access time updates open Registry Editor by typing regedit in Search input on Start Menu, locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem path entry and change NtfsDisableLastAccessUpdate value data to 0. After setting Last Access time update, system has to be restarted for the change to take effect. Alternatively, run the following command with administrator rights:
fsutil behavior set disablelastaccess 0

You can visit that website

http://www.febooti.com/products/filetweak/online-help/file-last-accessed-date.html

Clues

Add Comment
First Name Last Name
Web Site
E-Mail
Comment
Security Picture

Photos

Window Cleaner
Show All
Me in MSDN Forums
-   Answered the question Close some open windows by name in the Visual C# General forum
-   Answered the question Close some open windows by name in the Visual C# General forum
-   Answered the question Datagridview Click Event in C#.net in the Visual C# General forum
-   Contributed a proposed answer to the question Close some open windows by name in the Visual C# General forum
-   Replied to the question Datagridview Click Event in C#.net in the Visual C# General forum
-   Replied to the question Close some open windows by name in the Visual C# General forum
-   Contributed a helpful post (total votes:2) to the forums thread Array of events? in the Visual C# General forum
-   Answered the question Displaying random images from resources in the project in the Visual C# Language forum
-   Contributed a helpful post (total votes:1) to the forums thread sorted dictionary (Can i get key from value) in the Visual C# General forum
-   Contributed a proposed answer to the question Non-existing Argument in format string in the Visual C# General forum
Entries
News
Articles