@echo off
Setlocal Enabledelayedexpansion
:s
set /p str=请输入:
if not defined str echo 未定义&goto :s
If /i "!str!"=="/h" echo 执行/h命令&goto :s
If /i "!str!"=="/s" echo 执行/s命令&goto :s
If /i "!str!"=="/r" echo 执行/r命令&goto :s
if /i "!str:~,3!"=="/h " (
set "str=!str:~3!"
echo 执行/h命令
goto showtext
)
if /i "!str:~,3!"=="/s " (
set "str=!str:~3!"
echo 执行/s命令
)
:showtext
echo !str!
goto s