Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > String Manipulation > Operations on File Names >
Mathematica > Systems Interfaces & Deployment > File Operations > Operations on File Names >
Mathematica > Systems Interfaces & Deployment > File Operations > Directories & Directory Operations > Operations on File Names >

ExpandFileName

ExpandFileName["name"]
textually expands name to have the form of an absolute file name for your operating system.
  • ExpandFileName["name"] interprets name relative to your current directory.
  • The result from ExpandFileName has the form of an absolute file name, with standard pathname separators appropriate for your operating system.
  • ExpandFileName just operates on names of files; it does not actually search for the file specified.
Convert the relative directory path to the full name:
Reset the directory to the previous directory:
Convert the relative directory path to the full name:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Reset the directory to the previous directory:
In[3]:=
Click for copyable input
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team