How to delete all files and subfolders from the Command Line in Windows

- by

I was looking for the Windows equivalent of the Linux command “y| rm -rf” and despite my best efforts couldn’t work it out. We need to use “del”, with a couple of switches to do this recursively and for directories, and also automatically confirm this for every entry. Here it is:

del /s /q *

This will delete everything in the current directory.



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.