As of Version 6.0, OpenTemporary has been superseded by functionality in OpenWrite.


opens a temporary file to which output can be written, and returns an OutputStream object.

Details and Options

  • OpenTemporary is often used in conjunction with Put and Get as a way of preparing data that is exchanged between Mathematica and external programs.
  • OpenTemporary always creates a new file that does not already exist.
  • On Unix systems, OpenTemporary typically creates a file in the /tmp directory.
  • The global variable $TemporaryPrefix gives the base of the file name used by OpenTemporary.

See Also

CreateDirectory  Close  Run  RunThrough  OpenWrite


Introduced in 1988