错误 1.此时不应有 4。
2.系统找不到文件 1。
鄙人纯合子小白,求各位大佬指点!- @echo off
- set /p str=enter the selected number:
-
- :STR_VISTOR
-
- echo str = %str%
-
- for /f "tokens=1,*" %%a in (%str%) do (
- set /a a=%%a
- set str="%%b"
- if %a% GTR 4 (
- echo nonscript
- ) else (
- echo script%a%
- goto script%a%
- )
- )
-
-
- :script1
- echo 1
- goto STR_VISTOR
-
- :script2
- echo 2
- goto STR_VISTOR
-
- : script3
- echo 3
- goto STR_VISTOR
-
- :script4
- echo 4
- goto STR_VISTOR
-
- :nonscript
- echo invalid number %%a
- goto STR_VISTOR
复制代码
|