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 >

SetDirectory

Updated In 7 Graphic
SetDirectory["dir"]
sets the current working directory to dir.
SetDirectory[]
sets the current working directory to your "home" directory.
  • SetDirectory sets the current working directory, then returns its full name.
  • For a relative path name, SetDirectory sets the directory relative to the current working directory.
Set the current working directory:
Setting the directory pushes a directory onto the DirectoryStack:
Resetting the directory:
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]=
New in 2 | Last modified in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team