sets the current working directory to dir.
sets the current working directory to your "home" directory.
- SetDirectory sets the current working directory, then returns its full name.
- SetDirectory prepends the current working directory to the directory stack given by DirectoryStack.
- For a relative path name, SetDirectory sets the directory relative to the current working directory.
- SetDirectory is equivalent to SetDirectory[$HomeDirectory].
- SetDirectory[File["dir"]] is also supported.
Examplesopen allclose all
Basic Examples (1)
Set the current working directory:
Setting the directory pushes a directory onto the DirectoryStack:
Set the current working directory to the directory specified by the File object:
Wolfram Research (1991), SetDirectory, Wolfram Language function, https://reference.wolfram.com/language/ref/SetDirectory.html (updated 2016).
Wolfram Language. 1991. "SetDirectory." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/SetDirectory.html.
Wolfram Language. (1991). SetDirectory. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetDirectory.html