比较12和13,并显示结果
@echo off
getinfo /cmp:12,13
if errorlevel 2 goto big
if errorlevel 1 goto small
if errorlevel 0 goto equ
goto end
:big
echo x bigger than y
goto end
:small
echo x smaller than y
goto end
:equ
echo x = y
:end
判断今天的日期是否跟设定的日期相同
@echo off
getinfo /t
set today=%Year%%Mon%%Day%
getinfo /cmp:%today%,20051016
if errorlevel 2 goto big
if errorlevel 1 goto small
if errorlevel 0 goto equ
goto end