I have a folder structure:
C:\foo1\foo2\foo3\foo4\foo5
I want delete that folder completely by:
C:\>rmdir /S foo1
Respectively rmdir /s foo1
, rmdir /S /Q foo1
, rmdir /s/q foo1
, rd /s/q foo1
, rd /s/q "C:\foo1"
do the same.
But, not the wohle folder foo1
is deleted. Only foo5
is deleted, with the result message:
foo1\foo2\foo3\foo4 - The directory is not empty.
I repeat the command rmdir /S foo1
. Now foo4
is deleted.
I have to repeat this step 5 times until foo1
is completely deleted.
But the description of param /S
is:
Deletes a directory tree (the specified directory and all its subdirectories, including all files).
What is the reason that only the last directory is deleted but not the entire directory structure?
Using cmd as administrator does not change the result.
rmdir /s /q foo1
deletesfoo1
and all its contents.rmdir /S foo1
del /s /q foo1\*.*
C:\>del /s /q foo1\*.*
has no effect.