6

When we open a Microsoft Office spreadsheet or document, generally a temporary file with the name starting with "~$" is created near the main file. If we can't turn off this behavior, is there a way to specify a custom location for those temporary files (for instance, C:\Temp)?

What I am trying to do is to exclude those files from syncing done with the Google Backup and Sync tool, which still does not provide us with a built-in option for that.

TecMan
  • 1,255
  • 3
  • 22
  • 36
  • AFAIK it's not possible to turn off those lock/owner files or redirect them to some alternate location. – bcs78 Aug 03 '18 at 10:35
  • 3
    If anyone from MS is listening: this is a poor practice. At minimum move the "~" files to %temp%, NOT in same directory as .docx file. – William Leara Oct 31 '19 at 01:58
  • 2
    Another "feature" thereof (and MS likely has no clue it exists) is that the temp file's creation touches the DIR's file date. Now \mydir\ shows up with today as the modified date, bad for anyone who sorts by and makes use of modified date. When the temp file self-deletes, the touched date persists. Yet if the location could be specified, this malady would go away. – MicrosoftShouldBeKickedInNuts Feb 02 '20 at 19:06

1 Answers1

3

According to the Microsoft support article Description of how Word creates temporary files:

The location where Word creates the temporary files is hardcoded information and cannot be edited.

While the article specifically mentions Word, this holds true for other Microsoft Office applications.

As long as the Office app is closed properly, the temp file is automatically deleted. Only when the app is closed abnormally will these files persist.

I say Reinstate Monica
  • 25,487
  • 19
  • 95
  • 131
  • in our team, operation team have limited disk in os temp file, so better choice is that temp address can be configurable... – Amir Azizkhani Jan 10 '21 at 05:33