Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Systems Interfaces & Deployment > File Operations > Directories & Directory Operations >

$Path

$Path
gives the default list of directories to search in attempting to find an external file.
  • The structure of directory and file names may differ from one computer system to another.
  • The setting for $Path can be overridden in specific functions using the Path option.
  • The directory names are specified by strings. The full file names tested are of the form ToFileName[directory, name].
  • On most computer systems, the following special characters can be used in directory names:
.the current directory
..the directory one level up in the hierarchy
~the user's home directory
  • $Path can contain nested sublists.
Add a directory in which to look for files after all of the system defaults:
Add a directory in which to look for files before any of the system defaults:
Add a directory in which to look for files after all of the system defaults:
In[1]:=
Click for copyable input
Add a directory in which to look for files before any of the system defaults:
In[2]:=
Click for copyable input
New in 1 | Last modified in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team