CreateDirectory
CreateDirectory["dir"]
creates a directory with name dir.
creates a directory in the default area for temporary directories on your computer system.
Details and Options
- If "dir" is a single name, CreateDirectory creates a subdirectory of your current working directory.
- CreateDirectory[File["dir"]] is also supported.
- The directory created by CreateDirectory is initially empty.
- CreateDirectory returns the full name of the directory it creates, and $Failed if it cannot create the directory.
- CreateDirectory has attribute Listable.
- CreateDirectory[] creates a directory in the directory specified by the current value of $TemporaryDirectory.
- The default setting CreateIntermediateDirectories->True specifies that intermediate directories should be created as needed.
Examples
open allclose allBasic Examples (1)
Scope (1)
Create a directory specified as a File object:
Possible Issues (1)
CreateDirectory using a path name specified by a string does not create a CloudObject when evaluated in the cloud:
Use CloudObject instead when creating directories:
Now the CloudObject directory exists:
Text
Wolfram Research (1991), CreateDirectory, Wolfram Language function, https://reference.wolfram.com/language/ref/CreateDirectory.html (updated 2016).
CMS
Wolfram Language. 1991. "CreateDirectory." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/CreateDirectory.html.
APA
Wolfram Language. (1991). CreateDirectory. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CreateDirectory.html