DeleteDirectory

DeleteDirectory["dir"]
deletes the specified directory.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

Create a directory:

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

Check the presence of the new directory:

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

Delete the directory:

In[4]:=
Click for copyable input

The directory is no longer there:

In[5]:=
Click for copyable input
Out[5]=
New in 2
New to Mathematica? Find your learning path »
Have a question? Ask support »