0

这是我的批处理文件:

@echo off

:start

set /p test=">"

if "%test%" == "shutdown" do shutdown

if "%test%" == "say hello" goto echo

:echo

%echo%

goto start

:shutdown

shutdown /s

exit

但我想用用户输入的任何内容替换“你好”,可以这样做吗?

4

1 回答 1

0
@echo off

:start
set /p test=">"
if "%test%" == "shutdown" goto shutdown

echo you typed: %test%
goto start

:shutdown
shutdown /s
exit
于 2013-04-06T11:42:23.553 回答