This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / System Interface / File System /

$InitialDirectory

FilledSmallSquare $InitialDirectory gives the initial directory when the current Mathematica session was started.

FilledSmallSquare $InitialDirectory returns the full name of the directory as a string.

FilledSmallSquare If Mathematica is started from a shell or command line, $InitialDirectory gives the current operating system directory.

FilledSmallSquare If Mathematica is started from a menu or icon, $InitialDirectory typically gives the user's home directory $HomeDirectory.

FilledSmallSquare See Section 2.12.4.

FilledSmallSquare See also: Directory, $CommandLine, $HomeDirectory, $BaseDirectory, $InstallationDirectory.

FilledSmallSquare New in Version 3; modified in 5.0.