0

I have a program that relies on file timestamps that works fine in XP but fails in Windows 7.

I ran the following test in Windows 7:

Create go.bat to look at all 3 file timestamps:

@echo off
dir /tc test* | find "test"
dir /tw test* | find "test"
dir /ta test* | find "test"

notepad test.txt and create the file
run go.bat

10/10/2011  09:42 AM                 6 test.txt
10/10/2011  09:42 AM                 6 test.txt
10/10/2011  09:42 AM                 6 test.txt

wait till 9:43, notepad test.txt, don’t change anything, just close the file

10/10/2011  09:42 AM                 6 test.txt
10/10/2011  09:42 AM                 6 test.txt
10/10/2011  09:42 AM                 6 test.txt

Why didn’t the access time change?
Wait till 9:44, notepad test.txt, add a couple characters and save the changes

10/10/2011  09:42 AM                 8 test.txt
10/10/2011  09:44 AM                 8 test.txt
10/10/2011  09:42 AM                 8 test.txt

The write time changed because I modified the file, but how did I modify the file without accessing it? The access time did not change. Why?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by PapaGeek
0

It is disabled by default. Enable it with fsutil behavior set disablelastaccess 0 at the command prompt (as administrator of course)

0

Thanks nezachem,

That explains it, but I want to work within defaults, so I'll try to modify the program logic to use strictly write time.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.