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


OpenTemporary
OpenTemporary[]
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 the Wolfram Language 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
Tech Notes
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), OpenTemporary, Wolfram Language function, https://reference.wolfram.com/language/ref/OpenTemporary.html.
CMS
Wolfram Language. 1988. "OpenTemporary." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/OpenTemporary.html.
APA
Wolfram Language. (1988). OpenTemporary. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OpenTemporary.html
BibTeX
@misc{reference.wolfram_2025_opentemporary, author="Wolfram Research", title="{OpenTemporary}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/OpenTemporary.html}", note=[Accessed: 18-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_opentemporary, organization={Wolfram Research}, title={OpenTemporary}, year={1988}, url={https://reference.wolfram.com/language/ref/OpenTemporary.html}, note=[Accessed: 18-August-2025]}