For example, if I want to specify and delete the four folders 1, 2, 3, and 4 under the game folder on drive E (of course, these four folders are not empty files)... How should I write it? I'm a newbie. Please give me some guidance.
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
rd /s /q E:\game\1\
rd /s /q E:\game\2\
rd /s /q E:\game\3\
rd /s /q E:\game\4\
@echo off
for %%i in (1 2 3 4) do rd /s /q e:\game\%%i\
@echo off
set /a num = 1
:loop
if "%num%" == "5" goto end
rd /s /q e:\game\%num%\
set /a num += 1
goto loop
:end
set num=
@echo off
if "%*"=="" goto Usage
rem
if "%1"=="" goto :eof
rd /s /q e:\game\%1\
if "%2"=="" goto :eof
rd /s /q e:\game\%2\
if "%3"=="" goto :eof
rd /s /q e:\game\%3\
if "%4"=="" goto :eof
rd /s /q e:\game\%4\
echo OK!
pause
:Usage
echo Usage: %0 1 2 3 4
:eof
cd /d E:\game
rd /s /q 1 2 3 4