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

DirectoryName

Updated In 7 Graphic
DirectoryName["name"]
extracts the directory name from the specification for a file.
  • If name contains no directory specification, DirectoryName["name"] returns "".
  • DirectoryName by default uses pathname separators and other conventions suitable for your operating system.
  • DirectoryName[..., OperatingSystem->"os"] uses the conventions of the specified operating system. Possible choices are "Windows", "MacOSX" and "Unix".
On Windows get the directory string:
Apply DirectoryName two times:
New in 3 | Last modified in 7