A temporary file is a file that is created to temporarily store information in order to free memory for other purposes, or to act as a safety net to prevent data loss when a program performs certain functions.
For example, Word determines automatically where and when it needs to create temporary files. The temporary files only exist during the current session of Word. When Word is shut down in a normal fashion, all temporary files are first closed and then deleted.
Why does Word create temporary files?
Speed :
If there is not enough memory available to keep the document with all its edits in memory and still perform manipulations such as sorting, dragging, scrolling, and so on quickly along with any other applications that are running, then Word moves part of its code that is not being used or part of the document that is not being edited from memory to disk. This movement to temporary files on disk frees more memory for text manipulation or storage of the parts of the document that are being actively edited.
Data Integrity:
Word uses temporary files as a "safety net" to protect against system errors in its file-saving scheme. By saving to a temporary file first and then renaming the file to the proper name, Word ensures the data integrity of your original file against problems (such as a power failure or lost network connections) that may occur while the file is being written.
Answered by
Arvind Pal
, an ibibo Master,
at
9:44 AM on July 15, 2008