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

Documentation / Mathematica / The Mathematica Book / Mathematica Reference Guide / Files and Streams /

A.6.1 File Names

Conventions for file names.

Most files used by Mathematica are completely system independent. .mx and .exe files are however system dependent. For these files, there is a convention that bundles of versions for different computer systems have names with forms such as name/$SystemID/name.

In general, when you refer to a file, Mathematica tries to resolve its name as follows:

FilledSmallSquare If the name starts with !, Mathematica treats the remainder of the name as an external command, and uses a pipe to this command.

FilledSmallSquare If the name contains metacharacters used by your operating system, then Mathematica passes the name directly to the operating system for interpretation.

FilledSmallSquare Unless the file is to be used for input, no further processing on the name is done.

FilledSmallSquare Unless the name given is an absolute file name under your operating system, Mathematica will search each of the directories specified in the list $Path.

FilledSmallSquare If what is found is a directory rather than a file, then Mathematica will look for a file name/$SystemID/name.

For names of the form name` the following further translations are done in Get and related functions:

FilledSmallSquare A file is used if it exists.

FilledSmallSquare A file name.m is used if it exists.

FilledSmallSquare If name is a directory, then the file name/init.m is used if it exists.

FilledSmallSquare If is a directory, then$SystemID/ is used if it exists.

In Install, name` is taken to refer to a file or directory named name.exe.