SetDirectory
SetDirectory["dir"]
sets the current working directory to dir.
sets the current working directory to your "home" directory.
Details
- 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.
Examples
open allclose allBasic Examples (1)
Set the current working directory:
Setting the directory pushes a directory onto the DirectoryStack:
Scope (1)
Set the current working directory to the directory specified by the File object:
Text
Wolfram Research (1991), SetDirectory, Wolfram Language function, https://reference.wolfram.com/language/ref/SetDirectory.html (updated 2016).
CMS
Wolfram Language. 1991. "SetDirectory." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/SetDirectory.html.
APA
Wolfram Language. (1991). SetDirectory. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetDirectory.html