gives the directory stack that represents the sequence of current directories used.


DirectoryStack
gives the directory stack that represents the sequence of current directories used.
Details

- DirectoryStack[] returns a list of full names of directories.
- Each call to SetDirectory prepends one element to the directory stack; each call to ResetDirectory drops one.
Examples
Basic Examples (1)
Setting directory pushes a directory onto the DirectoryStack[]:
Resetting directory pops a directory from the DirectoryStack[]:
Tech Notes
Related Guides
History
Introduced in 1991 (2.0)
Text
Wolfram Research (1991), DirectoryStack, Wolfram Language function, https://reference.wolfram.com/language/ref/DirectoryStack.html.
CMS
Wolfram Language. 1991. "DirectoryStack." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DirectoryStack.html.
APA
Wolfram Language. (1991). DirectoryStack. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DirectoryStack.html
BibTeX
@misc{reference.wolfram_2025_directorystack, author="Wolfram Research", title="{DirectoryStack}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/DirectoryStack.html}", note=[Accessed: 08-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_directorystack, organization={Wolfram Research}, title={DirectoryStack}, year={1991}, url={https://reference.wolfram.com/language/ref/DirectoryStack.html}, note=[Accessed: 08-August-2025]}