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 >

DeleteFile

DeleteFile["file"]
deletes a file.
DeleteFile[{"file1", "file2", ...}]
deletes a list of files.
Copy a file and copy it into the new directory:
The file is there:
Delete the file:
The file is no longer there:
Copy a file and copy it into the new directory:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
The file is there:
In[4]:=
Click for copyable input
Out[4]=
Delete the file:
In[5]:=
Click for copyable input
The file is no longer there:
In[6]:=
Click for copyable input
Out[6]=
New in 2
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team