How do I make files available for the kernel to access?
When requesting an external file for the Mathematica kernel to load (using commands like Get, Needs, ReadList, etc.), the kernel searches all of the directories listed in the global variable $Path. Simply place the file in any directory listed in $Path and the kernel will be able to find the file.
If you want to make a package file (*.m) available in Mathematica 3.0 or 4.0, we suggest placing this file in either one of your Applications directories.
Macintosh
System Folder:Preferences:Mathematica:4.0:AddOns:Applications
Mathematica 4.0 Files:AddOns:Applications
Windows
C:\Program Files\Common Files\Mathematica\4.0\AddOns\Applications
C:\Program Files\Wolfram Research\Mathematica\4.0\AddOns\Applications
Unix
~/.Mathematica/4.0/AddOns/Applications
/usr/local/mathematica/AddOns/Applications
(If you're using Mathematica 3.0, replace 4.0 with 3.0 in the directories above.)
Alternatively, you can change the working directory to the directory that contains the file with SetDirectory. However, this will last only for the current kernel session.
Questions or comments? Send email to support@wolfram.com.
|