WolframLang: Navigate Directory

By Xah Lee. Date: . Last updated: .

show current dir

Directory[]
  • return current dir path. (like linux pwd)
  • Result does not contain slash.

Directory

change dir

SetDirectory[]

set current dir to home dir. (like linux cd)

home dir is the value of $HomeDirectory

SetDirectory

SetDirectory[path]

set current dir to path, and also automatically add to dir history represented by DirectoryStack[].

(like linux cd path, and also auto do pushd )

goto previous dir

ResetDirectory[]

set current dir to previous dir. (like linux popd)

ResetDirectory

show directory history

DirectoryStack[]

return a list of directories of previous current directories.

DirectoryStack

WolframLang: Shell Tasks