views:

1129

answers:

1

How does Windows Explorer determine the "Date Modified" field for folders? [Aside: I know this is asking from an explorer-specific perspective, but the behaviour could be useful to coding search/sort type activities]

Is there a definitive description of this anywhere - searches of Microsoft, MSDN, Google & Stack Overflow have been unsuccessful.

Personal experiments seem to suggest that in a tree of folders:

  1. when a folder/file is added/deleted in a folder, the containing folder's date modified is updated.
  2. when the content of a file is modified, the containing folder is unaffected

However, I'm looking at some directories that don't seem to conform to these basic rules - running down the tree I have (dates in DD/MM/YYYY format):

folder     (date created:  2/2/2006, date modified: 2/3/2006)
  folder   (date created:  2/2/2006, date modified: 2/3/2006)
    folder (date created:  2/2/2006, date modified: 1/6/2009)
      file (date created: 27/3/2009, date modified: 2/2/2006)
+2  A: 

This is not explorer specific, this is NTFS-related.

See http://support.microsoft.com/kb/299648 for some rules

Note: Modified time can be disabled with filesystem option -- so you should never relay on it.

J-16 SDiZ