Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'edit $Path' topicStudent Support Forum > General > "edit $Path"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
jf
11/20/12 12:33pm

The easy way it to make it so $Path is changed each time the Kernel starts.

Under $BaseDirectory or $UserBaseDirectory, there is a Kernel directory with a file init.m in it. Edit one of the init.m's to include a command to set the $Path variable.

A common change is adding a directory to look in.
The post-change init.m file would look like
======
(** User Mathematica initialization file **)
AppendTo[$Path,"/temp/"];
======

or maybe
======
(** User Mathematica initialization file **)
AppendTo[$Path,"C:\\Phys314\\"];
======
on Windows. Note the doubling of the backslashes.
(Tables "Some special 8-bit characters." and "Entering character strings." in
reference.wolfram.com/mathematica/tutorial/InputSyntax.html#16741)


If you are adding a lot of directories, Join might be easier.

$Path = Join[ $Path, {"dir1","dir2",..,"dir137"}];


URL: ,

Subject (listing for 'edit $Path')
Author Date Posted
edit $Path PhysicsGuy 11/20/12 10:50am
Re: edit $Path jf 11/20/12 12:33pm
Re: Re: edit $Path PhysicsGuy 12/05/12 9:39pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic