1

How does the inheritance and propagation of modified times happen? In order to better put my question, I am going to list three examples:

  1. A folder has three files. One file gets modified (by any user or service or application). This changes the modified time of the folder as well. (Common case)

  2. A folder has three files of which one file gets modified (again it could be by a service, app or user). But this did not change the modified time of the parent folder.

  3. A folder has no file (empty). But let's say when a service ABC runs, it changes its modified time.

So my question is, what is controlling all that? What decides how these modified times will update?

After searching, I found that there is a value in Registry NtfsDisableLastAccessUpdate but I think this is not for individual files/folders. Please advise.

6
  • You'll want to mention the OS in question. Obviously you're talking windows, but which variants? This is the kind of behavior that might change over the years. Also, have you set up a test case and tried your various scenarios to see what would happen? Nov 22, 2013 at 2:52
  • I believe that you’re mixing apples and oranges: NtfsDisableLastAccessUpdate probably has to do with access times, and the rest of your question has to do with modification times. Beyond that, it depends on how the application works. If it simply opens the file and writes to it, that should not count as a modification to the directory. But, if it creates a temporary file in the same directory, and then deletes it, that will count as a modification to the dir. And some editor-type programs may make a copy of a file, and then delete the original and rename the new file to the original name. Nov 23, 2013 at 0:19
  • Scott,thank you for your response.I couldn't get 'If it simply opens the file and writes to it, that should not count as a modification to the directory.'.Let say I have a job folder on my desktop and I open a doc in the folder, modify and save it. What I see is that the modification time of job folder changes to the time when the recent file is modified. Doesn't this example fall to the category you mentioned 'should not count as a modification to the directory'?OR do you mean that MS Word deletes the original file and creates new one every time I modify my doc? Thanks again for help! Dec 1, 2013 at 7:22
  • @user3020081: Microsoft Word falls into (at least) one of the last two categories I described. If you open a Word document and then look at the folder (with Windows Explorer) with hidden files shown, or list the directory (in Command Prompt) with dir /a, you’ll see a hidden temporary file. I don’t know whether Word simply deletes that file when it’s done, or whether it deletes the original file and renames the temporary file, but the result is the same. Dec 1, 2013 at 20:59
  • @user3020081: By the way, welcome to Super User. For your information, when you respond to a post or a comment (in a new comment), it’s conventional to mention the author’s name, preceded by “@”, as in “@Scott”. That way he gets notified. You can abbreviate, e.g., “@Scot”, or use an entire name (without spaces), e.g., “@ MichaelKohne”. The author of a post is automatically notified of comments to that post. See the Replying in comments paragraphs of this help page. Dec 1, 2013 at 20:59

0

You must log in to answer this question.

Browse other questions tagged .