-
-
Save warthurton/a7572e89b253289408a2c3a3424f5d17 to your computer and use it in GitHub Desktop.
Fastest possible way to delete large number of files/folders for MS Win (thousands to millions of folders)
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 | |
set /p Input=Enter Folder name to delete: | |
:ConfPromt | |
set /p Confirm=Are you sure you want to delete "%CD%\%Input%"?(y/n): | |
IF /I "%Confirm%" == "n" ( | |
Echo Canceling. | |
pause | |
EXIT /b | |
) | |
IF /I NOT "%Confirm%" == "y" ( | |
GOTO ConfPromt | |
) | |
Echo Delete Start | |
set "startTime=%time%" | |
del /f/s/q "%Input%" > nul | |
rmdir /s/q "%Input%" | |
Echo "Deleted %CD%\%Input% in [%startTime% > %time%]" | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment