resets the current working directory to its previous value.


ResetDirectory
resets the current working directory to its previous value.
Details

- Successive calls to ResetDirectory yield earlier and earlier current directories.
- ResetDirectory uses the directory stack given by DirectoryStack[].
- ResetDirectory removes the last element from the directory stack, and makes the second‐to‐last element current.
Examples
Basic Examples (1)
SetDirectory pushes a directory onto the DirectoryStack[]:
ResetDirectory pops a directory from the DirectoryStack[]:
Tech Notes
Related Guides
History
Introduced in 1991 (2.0)
Text
Wolfram Research (1991), ResetDirectory, Wolfram Language function, https://reference.wolfram.com/language/ref/ResetDirectory.html.
CMS
Wolfram Language. 1991. "ResetDirectory." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ResetDirectory.html.
APA
Wolfram Language. (1991). ResetDirectory. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ResetDirectory.html
BibTeX
@misc{reference.wolfram_2025_resetdirectory, author="Wolfram Research", title="{ResetDirectory}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/ResetDirectory.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_resetdirectory, organization={Wolfram Research}, title={ResetDirectory}, year={1991}, url={https://reference.wolfram.com/language/ref/ResetDirectory.html}, note=[Accessed: 11-August-2025]}