Avoid Powerpoint(/Word) 2010 creating temporary files in working directory

5

2

When opening a temporary file, Powerpoint 2010 usually creates a temporary, hidden file called ~$filename.pptx in the same directory. This is undesirable, since it can cause unnecessary activity with e.g. Dropbox. Furthermore, the "Documents" folder should not be used for temporary files -- we have the %TEMP% folder for that.

So, is it possible to have Powerpoint create its temporary files in %TEMP% instead? The following link suggests that it might not be possible: http://support.microsoft.com/kb/211632

Also, why does Microsoft not use the %TEMP% folder?

Ben

Posted 2011-07-11T08:37:14.983

Reputation: 201

A more modern solution would be to use an alternate data stream. – Ben – 2011-07-13T10:34:22.933

1'tis a shame Dropbox doesn't support excluding filename patterns. – lornix – 2012-06-17T10:31:22.007

Answers

2

The reason Office doesnt use the temp folder any more is due to the fact that Office documents are commonly shared and stored on network drives. If I was editing a Word doc off a network share right now and my hard drive died, I could move to another computer and pick up at, or close to, the point when the drive died. If the file was being edited locally, all the work I had done would have been lost.

Keltari

Posted 2011-07-11T08:37:14.983

Reputation: 57 019

3

It isn't possible nor desired for several reasons. While having a temp file will cause unnecessary syncs, that isn't the concern.

As the articles say, this is mainly due to speed(especially larger files) and more importantly, data integrity. What if there was an interruption while Office was writing to your original file?? While easily recoverable, it isn't a gamble I would take as a developer.

I wouldn't worry about the unnecessary activity. I lorem ipsum about 30 pages on my dropbox just now and I hit 6KB/s of network activity for about 5 seconds. . .

surfasb

Posted 2011-07-11T08:37:14.983

Reputation: 21 453

But why does Microsoft not use the %TEMP% folder instead? – Ben – 2011-07-11T11:43:34.217

1For situations similar to yours. If it was a document stored offline, WHOLE doc file into %temp%, creating unnecessary traffic. In the case of creating a temp file in the same directory as the working doc, the server has a chance to realize that it is a copy command and thus handle most of the changes server side. In the current model, the worst case scenario is a complete copy. In your suggestion, worst case scenario is they copy it from the network to the local temp, then back to the network. – surfasb – 2011-07-11T17:41:10.097

But the temporary file is not a copy of the original document. – Ben – 2011-07-13T10:33:05.010

1

The page you are referring to says:

Word gains significant performance speed by placing the temporary file in the same directory as the saved file. If Word placed the temporary file elsewhere, it would have to use the MS-DOS COPY command to move the temporary file from the other directory to the saved location. By leaving the temporary file in the same directory as the saved document file, Word can use the MS-DOS MOVE command to quickly designate the temporary file as the saved document.*

user671280

Posted 2011-07-11T08:37:14.983

Reputation: 111