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 > FileNameDrop >
Mathematica > Systems Interfaces & Deployment > File Operations > Operations on File Names > FileNameDrop >
Mathematica > Systems Interfaces & Deployment > File Operations > Directories & Directory Operations > Operations on File Names > FileNameDrop >

FileNameDrop

FileNameDrop
drops the first n path elements in the file name .
FileNameDrop
drops the last n path elements in the file name .
FileNameDrop
drops elements m through n in the file name .
FileNameDrop
drops the last path element in the file name .
  • FileNameDrop by default assumes that path elements are separated by pathname separators suitable for your operating system.
  • FileNameDrop just operates on names of files; it does not actually search for the file specified.
  • If more elements are specified to be dropped than are present, FileNameDrop just drops those that are present.
Find the parent directory:
On Windows, the share name is treated as a single unit:
Find the parent directory:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
On Windows, the share name is treated as a single unit:
In[1]:=
Click for copyable input
Out[1]=
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF