Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Delete all files and directory structure at the given path
@echo off
REM Completely delete file / directory
echo Are you sure that you want to delete %1?
echo y/n
choice /c:yn > nul
if errorlevel 2 goto no
if errorlevel 1 goto start
goto end
echo Starting to delete files in %1
del /f/s/q %1 > nul
echo Deleting directory structure at %1
rmdir /s/q %1
goto end
echo Cancelling your request
goto end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.