gives the parent of the current working directory.
gives the parent of the directory dir.
gives the directory n levels up from dir.
Examplesopen allclose all
Basic Examples (3)
Get the parent directory of the directory specified by the File object:
Properties & Relations (4)
In ParentDirectory[dir], dir must exist as a directory:
ParentDirectory always returns a full path:
ParentDirectory operates only on existing directories and returns a full path:
FileNameDrop performs a similar path operation but at a purely textual level: