To delete everything inside a folder using a batch file you can use the following snippet.
It will delete all files AND folders!
set folder="C:\Users\Codesnippets\Desktop\Testfolder" cd /d %folder% for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q)
One thought on “How to delete everything inside a folder using a batch file”
RT @CodeSnippetsNET: Delete foldercontents using a #batch http://t.co/5G9RHGV6lB #programming