You cannot delete everything with either rmdir
or del
alone:
rmdir /s /q
does not accept wildcard params. So rmdir /s /q *
will error.del /s /f /q
will delete all files, but empty subdirectories will remain.My preferred solution (as I have used in many other batch files) is:
rmdir /s /q . 2>NUL