DirectoryStack
DirectoryStack[] gives the directory stack that represents the sequence of current directories used.
Examples
Get the current directory stack:
DirectoryStack[]Something isn't working? Report an issue.
Please visit the official Wolfram Language Reference for more details.