@echo off
cd \
set /p  var=请输入值...
if "%var%"=="fqt" (echo yes) else (echo no)
echo %var%
pause

在设置自定义变量时 set 变量后要紧跟=中间不能有空格

相关文章: