When looking at a files "Properties" I look at the (Created & Modified) dates.
Please correct me if I'm wrong... I thought the (Accessed dates) and the (Modified dates) were usally going to be the same?
Answer to the question> the latest date.
Hi
In principle the original idea was, or should have been, that :-
Created is when the file was first created;
Accessed is the last time anything read the contents;
Modified is the last time the file was re-written.
All three dates should exactly match at the instant when the file first appears.
In practice that may happen sometimes - but not so much now we have Windows !!!
Using Xplorer2, a dual pane alternative to Windows Explorer, and also DIR in a DOS CMD Shell, I captured :-
Name Modified Created AccessedNew_Files.rtf 22/07/2007 21:17:14 23/05/2007 17:45:18 09/11/2008 15:41:40TweakMASTER-Install.exe 23/05/2007 16:17:34 23/05/2007 16:17:24 09/11/2008 15:36:08C:\Documents and Settings\Dad\My Documents\My Received Files\Edit_etc>DIR /T:A09/11/2008 15:41 577 New_Files.rtf09/11/2008 15:36 1,728,160 TweakMASTER-Install.exeC:\Documents and Settings\Dad\My Documents\My Received Files\Edit_etc>DIR /T:A09/11/2008 15:41 577 New_Files.rtf10/11/2008 14:08 1,728,160 TweakMASTER-Install.exe
It is worth noting that the Tweak*.exe file was "opened" when the download started,
and 10 seconds later the download ended and my Anti-virus scrutinised and permitted the contents on-board,
hence the 10 second delay after "Created" before "Modified".
*.exe files can damage Windows (e.g. a virus) so Windows gets its retaliation in first, and the Accessed date gets caught in the cross-fire !!!
Another possibility is simply that System Restore inspects many file types, including *.exe but excluding *.rtf, with a view to capturing copies in a restore point incase the get changed.
Either way, and in addition, if Windows ever sees a file in a directory listing, it instantly trashes the Accessed date to "NOW".
Furthermore, if the file is an *.exe :-
the new date is instantly put in whatever DOS "DIR" reads (I guess I mean the disk, but Windows has so many peculiarities I am not sure);
otherwise the new date is held pending, and written to the disc (or whatever) upon close down ready for the next time the computer starts up.
Before I used Windows to show all three dates of two files, I captured the first of the two DIR lists, hence the Windows list and the first DIR list show the same Accessed date.
I then captured the second DIR list, which shows that Tweak*.exe has just been "Accessed". Windows does not show this change other than in a new instance of Windows Explorer etc.
The New*.rtf Accessed date is also punished - but it is suspended and pending via a different mechanism.
Even launching a new instance of CMD still shows the old accessed date, BUT it is going to change.
The first of the two DIR lists proves the New*.rtf will get punished.
Yesterday at 09/11/2008 15:36:08 I performed the same operations as today, after which the New*.rtf date remained as per Modified, i.e. 22/07/2007 21:17:14.
Today New*.rtf date had become 09/11/2008 15:41:40, which is 5 minutes after 09/11/2008 15:36:08 and corresponds to when I closed down the computer.
Files with alternative extensions may suffer alternative consequences.
The above tests were done within my private documents, from which System Restore is excluded.
If you are looking at C:\Program Files\* the waters become muddy !!!
Finally, Modified should be later than Created, but not always, as an example :-
C:\WINDOWS\system32\c_20127.nls :- Modified 18/08/2001 19:00:00; Created 20/05/2003 16:24:58.
My guess is the source code was last changed in 2001, but a security hole was found and, with no change to the raw source code, conditional compiler directives or something may have altered the EFFECT of the code (e.g. specifying a different or updated library) and a new c_20127.nls was created and transferred on a Patch Tuesday Update. 20/05/2003 16:24:58 may be the date of Patch Tuesday hitting this particular computer, or when the latest version was prepared for release to every-one, or .......
Conclusions :-
1. The Accessed date is extremely vulnerable to damage if Windows should look at the file;
2. The other two dates often mean what they say - but there are exceptions to this general rule;
3. When in Windows, tread carefully !!!
n.b. Some of the above I learnt today - Windows is a never ending bag of tricks.
Regards
Alan