:start
(生成test.bat,其内容已限制在good,nicer,bad)
cksum /fs test.bat 20 ::判断bat档的大小,防止输入其他多余的字符
if errorlevel 1 goto other
xgrep good test.bat ::判断里面的内容是否是我要的
if errorlevel 1 goto start
set thing=good ::如果是我要的就set thing
goto end
:other
cksum /fs test.bat 21
if errorlevel 1 goto other1
xgrep nicer test.bat
if errorlevel 1 goto start
set thing=nicer
goto end
:other1
cksum /fs test.bat 13
if errorlevel 1 goto start
xgrep bad test.bat
if errorlevel 1 goto start
set thing=bad