CreateTemporary

As of Version 10.4, CreateTemporary has been superseded by CreateFile.

CreateTemporary[]

creates a temporary file with a unique name in the default temporary directory and returns the name of the file.

Details

  • CreateTemporary only creates the file; it does not open it.
  • The file created can subsequently be opened for reading or writing in binary or text mode.
  • CreateTemporary returns the full name of the file it creates or $Failed if it cannot create the file.

Examples

Basic Examples  (1)

Create a temporary file:

The file remains closed:

Wolfram Research (2012), CreateTemporary, Wolfram Language function, https://reference.wolfram.com/language/ref/CreateTemporary.html.

Text

Wolfram Research (2012), CreateTemporary, Wolfram Language function, https://reference.wolfram.com/language/ref/CreateTemporary.html.

CMS

Wolfram Language. 2012. "CreateTemporary." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CreateTemporary.html.

APA

Wolfram Language. (2012). CreateTemporary. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CreateTemporary.html

BibTeX

@misc{reference.wolfram_2023_createtemporary, author="Wolfram Research", title="{CreateTemporary}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/CreateTemporary.html}", note=[Accessed: 18-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_createtemporary, organization={Wolfram Research}, title={CreateTemporary}, year={2012}, url={https://reference.wolfram.com/language/ref/CreateTemporary.html}, note=[Accessed: 18-March-2024 ]}