Delete files or folder recursively on Windows CMD

cmd, delete-file, windows

Solution

The other answers didn't work for me, but this did:

del /s /q *.svn
rmdir /s /q *.svn

/q disables Yes/No prompting

/s means delete the file(s) from all subdirectories.

Problem

How do I delete files or folders recursively on Windows from the command line? I have found this solution where path we drive on the command line and run this command. I have given an example with a .svn file extension folder: ``` for /r %R in (.svn) do if exist %R (rd /s /q "%R") ```

Original source

Related problems