China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

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!

中国DOS联盟论坛
The time now is 2026-08-02 21:40
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Help me take a look at this batch file View 768 Replies 0
Original Poster Posted 2006-12-24 09:04 ·  中国 江西 九江 电信
初级用户
Credits 103
Posts 43
Joined 2006-12-22 23:30
19-year member
UID 74302
Gender Male
Status Offline
@echo off

choice /c:dme defrag,mem,end

if errorlevel 3 goto defrag

if errorlevel 2 goto mem

if errotlevel 1 goto end

:defrag

c:\dos\defrag

goto end

:mem

mem

goto end

:end

echo good bye




People online say chioce's return codes are 1234... what does that mean? Taking the example above, how should it be understood?


──────────────── Moderator record ────────────────
Handled by: namejm
Original title: Help me take a look at this batch file
Note: Because the title is too vague, which is not convenient for forum searching and management, please change the title within three days.
Tip: To change the title, click
Editat the lower right of the current post, and after making the changes press Edit Post .
Penalty: Since you only recently left the forum newbie stage, no penalty will be given for now; if the title is still not changed after three days,
  2 credits will be deducted as a penalty, and the moderator will forcibly change the title. Please click
hereto read the forum posting rules,
  so as to avoid making rule-breaking posts in future discussions.
──────────────── Moderator record ────────────────


[ Last edited by namejm on 2006-12-23 at 10:02 PM ]
Forum Jump: