3

When I open an excel file, for some reason the last modified date of the containing folder changes to the current time-stamp. I want to disable this, it causes lots of confusion, especially when I order the folders view by modified date.

How can I disabled prevent this issue?

CharlieRB
  • 22,566
  • 5
  • 56
  • 105
Vlad Kucherov
  • 51
  • 1
  • 1
  • 4
  • Date modified will always update when a change is made to or inside a folder. Are you looking for the `Date created` rather than `Date modified`? – CharlieRB Sep 08 '14 at 15:57
  • For reference sake, here's what won't work: (1) Turning off autorecovery for the file (I assumed incorrectly that the Modified date of the folder was being incremented by the hidden temp file that office creates). (2) I turned off Thumbnails for my test folder as some folks had reported that it causes Modified Date to increment. Perhaps the correct solution is to not rely on the Modified Date of a folder, instead rely on the files. – JNevill Sep 08 '14 at 16:05
  • One more failed attempt: Go to File>>Properties in Windows explorer for the office file. Click "Read Only" and attempt to open. Modified Date is still updated. – JNevill Sep 08 '14 at 16:17
  • @CharlieRB: If I open an Excel file and close it without saving, the file date won't change but the containing folder's date will. – karatedog Aug 17 '15 at 10:30
  • @karatedog You are commenting on a year old post and you're stating the obvious. What are you trying to say? – CharlieRB Aug 17 '15 at 12:31
  • @CharlieRB: You stated: "Date modified will always update when a change is made to or inside a folder". I wanted to inform you (and hopefully get answers) that I made _no_ change inside the folder, none of the file's date changed, yet, the folder date changed. – karatedog Aug 17 '15 at 12:44
  • Please avoid using the comment area to ask your own question. Use the "Ask Question" button to ask your own so you can get an answer for your specific issue. To clarify my statement, opening a file within a folder will change that date even if you don't save changes. This is because programs add a temporary file, then remove it when you close the file. So, the contents of the folder have technically changed. – CharlieRB Aug 17 '15 at 16:56
  • @karatedog When you open the file in Excel in a non-readonly way then Excel creates a lock file in the same folder, and the creation of that lock file is a modification to the folder (and the deletion of the lock file is another) hence the change of the modification timestamp. – springy76 May 31 '16 at 09:08
  • MS Word does the exact same thing. Apparently, opening a document in Word or Excel is reason for MS Office to update the modified date on the containing folder. I guess MS thinks that *viewing* the document in those editors, even without saving, counts as a legitimate reason to change the folder's date. Not my opinion, but that's what it looks like. The best way around this is the answer below that suggests to use the Preview Pane in Windows Explorer, which, for a fact, does not modify the date upon viewing. – bgmCoder Nov 07 '18 at 22:59
  • Possible duplicate of [Stop Excel from changing file contents upon open](https://superuser.com/questions/477382/stop-excel-from-changing-file-contents-upon-open) – Anthony Serdyukov Oct 16 '19 at 04:01

4 Answers4

1

You could create a read-only network share and use that for opening such files. Excel won't have any chance then for creating the lock files which in turn change the modification date of the containing folder.

springy76
  • 111
  • 2
  • I like this answer because it is a general solution, guaranteed to work for ANY program. If they don't have permission to touch anything, then you can be certain it won't change! – ToolmakerSteve Jul 17 '21 at 11:40
1

for quick browsing through a few files it was convenient to use the Explorer with preview Pane: it opens any Office file without modifying dates of the file nor the containing folder

markcelo
  • 111
  • 1
1

The only solution I have found so far is to open Excel via the Start Menu (or launcher of choice). Then go to File>>Open (or Ctrl+o). Choose your file, and click the drop down on the "Open" button to open it as Read Only. Opening it in this manner will keep the folder's Modified Date from updating.

JNevill
  • 1,214
  • 6
  • 12
  • Well this worked but this is awful way... I have dozens of files to open... opening it using Excel makes things harder – Vlad Kucherov Sep 09 '14 at 12:06
  • Yea... I agree... this is a stupid solution. The issue is clearly something within Office's code, so there's probably not anything that can be done to get around it, besides this. If it comes to it, you might consider whipping up some VBA/Macro to open the workbooks you need as read-only and then keep that VBA in a workbook in a seperate folder. That's also hinky as all hell, but it might take some of the pain away. – JNevill Sep 09 '14 at 12:29
1

The other way to prevent opening an Excel file from changing the folder's modified date is to ctrl-shift right click on file name and select open in protected mode.

Edit: method2 is right click menu on file and click new.

user139301
  • 111
  • 3