-
-
Save openopen114/c8b2655e28f45204fb4c5d4771fa85e5 to your computer and use it in GitHub Desktop.
Windows bat-script to fast delete a folder and all sub-directories with a cmd command.
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 | |
CLS | |
ECHO ###################################### | |
ECHO # Fast delete folder and sub-folders # | |
ECHO ###################################### | |
ECHO. | |
ECHO. | |
set /P c=Delete %CD% [Y/N]? | |
if /I "%c%" EQU "Y" goto :DELETE | |
if /I "%c%" EQU "J" goto :DELETE | |
EXIT | |
:DELETE | |
ECHO ######################################################## | |
ECHO Start deleting... don't close this window until finished | |
SET DIR=%CD% | |
CD / | |
DEL /F/Q/S "%DIR%" > NUL | |
RMDIR /Q/S "%DIR%" | |
ECHO Finished deleting %DIR%. | |
ECHO Hope you were sure what you did there... | |
ECHO ######################################################## | |
PAUSE | |
EXIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment