Wolfram: Navigate Directory

By Xah Lee. Date: . Last updated: .

Show current dir

Directory[]

return current dir path. (like linux pwd)

Directory[]
(* c:\Users\xah\.emacs.d\temp *)

change dir

SetDirectory[]

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

home dir is the value of $HomeDirectory

SetDirectory[path]

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

(like linux cd, and also auto do pushd )

goto previous dir

ResetDirectory[]

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

show directory history

DirectoryStack[]

return a list of directories of previous current directories.

Wolfram. Shell Scripting Tasks