CODE: [Copy to clipboard]
@echo off
set All=0
if not '%1' == '' goto _loop
echo.
echo [DELTREEX]Purging current directory ...
echo Are you sure you want to purge current directory?
choice.exe /C YNQ /M "Press Y for Yes, N for No, Q for Quit."
if errorlevel 2 goto _quit
for /D %%D in (*.*) do @rd /s /q "%%D"
del /f /q .
echo.
echo [DELTREEX]Purge current directory done!
dir
goto _quit
:_loop
if '%1'=='' goto _quit
if not "%All%"=="0" goto _go
echo.
echo Purging directory %1 ...
echo Are you sure you want to purge directory: %1?
choice.exe /C YNAQ /M "Press Y for Yes, N for No, A for All directory, Q for Quit."
if errorlevel 4 goto _quit
if errorlevel 3 goto _all
if errorlevel 2 goto _next
if errorlevel 1 goto _go
:_all
set All=1
goto _go
:_go
for /D %%D in (%1\*.*) do rd /s /q "%%D"
del /f /q %1\.
echo.
echo [DELTREEX]Purge directory %1 done!
dir %1
goto _next
:_next
shift
goto _loop
:_quit
set All=