Delete Folders in Batch

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

@ECHO OFF

Set dir=path-to-dir

Echo Deleting all files from %dir%


del %dir%\* /F /Q

Echo Deleting all folders from %dir%


for /d %%p in (%dir%\*) Do rd /Q /S "%%p"
@echo Folder deleted.

exit

You might also like