Created
December 21, 2019 13:24
-
-
Save Tyxz/e4d95239284c0ef6549ba42cebc60c04 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 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