$UserDocumentsDirectory

$UserDocumentsDirectory

gives your default "documents" directory.

Details

  • $UserDocumentsDirectory returns the full name of the directory as a string. Its value is generally designated by the operating system.
  • Typical values are:
  • "C:\Users\\Documents"Windows
    "~/Documents"macOS
    "~/Documents"Linux

Examples

Basic Examples  (1)

A typical default "documents" directory on macOS:

Introduced in 2007
 (6.0)