SELECT CASE IN BAT (AlLeesno)

xiaoxiao2021-03-06  88

@echo off

Rem test in winxp build by Allyesno

IF "% 1" == "" Echo No input parameter & goto: EOF

SET CASE = CASE1, CASE2, CASE3> NUL

Echo% case% | FINDSTR "/ <% 1 />"> NUL & IF Errorlevel 1 Echo does not have this parameter & goto: EOF

goto% 1

Goto error

: Case1

Echo Case1 & Goto: EOF

: Case2

Echo Case2 & Goto: EOF

: Case3

Echo Case3 & Goto: EOF

: Error

Echo does not have this parameter

转载请注明原文地址:https://www.9cbs.com/read-105755.html

New Post(0)