Wednesday 1 July 2020

Delete files or folder recursively on Windows CMD

https://stackoverflow.com/questions/12748786/delete-files-or-folder-recursively-on-windows-cmd

Delete files or folder recursively on Windows CMD

 

You can use this in the bat script:
rd /s /q "c:\folder a"
Now, just change c:\folder a to your folder's location. Quotation is only needed when your folder name contains spaces.
 
 
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.
 

 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.