简体   繁体   English

如何在批处理文件中使用多个单词作为用户输入?

[英]How can I use more than one word as the user input on a batch file?

how do I make it work so that when I have more than one word as the user input? 如何使它工作,以便在用户输入多个单词时? for the percent? 的百分比?

@echo off

Title programming test

set /p Heyyya= Type a command:

if %Heyyya% == "stop now" echo Correct

if not %Heyyya% == "stop error" echo sorry

pause >nul
@echo off

echo Title programming test
set /p Heyyya=Type a command:

if "%Heyyya%"=="stop now" (echo Correct & goto:correct )
if not "%Heyyya%"=="stop error" echo Sorry

:correct

pause >nul

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM