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?