Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Systems Interfaces & Deployment > File Operations > Directories & Directory Operations >

$TemporaryDirectory

$TemporaryDirectory
gives the main system directory for temporary files on your computer system.
  • Mathematica does not automatically delete files it creates in the $TemporaryDirectory directory, although the operating system may do so.
Show the path for the temporary directory:
Open a stream for writing in the temporary directory:
Close the stream:
Print the resulting file:
Show the path for the temporary directory:
In[1]:=
Click for copyable input
Out[1]=
Open a stream for writing in the temporary directory:
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Close the stream:
In[4]:=
Click for copyable input
Out[4]=
Print the resulting file:
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team