SetDirectory

SetDirectory["dir"]

sets the current working directory to dir.

SetDirectory[]

sets the current working directory to your "home" directory.

Details

Examples

open allclose all

Basic Examples  (1)

Set the current working directory:

In[1]:=
Click for copyable input
Out[1]=

Setting the directory pushes a directory onto the DirectoryStack:

In[2]:=
Click for copyable input
Out[2]=

Resetting the directory:

In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Scope  (1)

See Also

ResetDirectory  Directory  DirectoryName  $Path  ProcessDirectory

Tutorials

Introduced in 1991
(2.0)
| Updated in 2016
(11.0)