Created
December 1, 2017 11:24
-
-
Save DavidEdwards/61d4d336232284b33b237b04da5bfe10 to your computer and use it in GitHub Desktop.
Delete all files and directory structure at the given path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 | |
:start | |
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 | |
:no | |
echo Cancelling your request | |
goto end | |
:end | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment