联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off set All=0 if not '%1' == '' goto _loop echo. echo 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 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 Purge directory %1 done! dir %1 goto _next :_next shift goto _loop :_quit set All=