我想在下面的代码中使用IF语句。在批处理文件中使用IF语句时出错(Windows)
@echo off
SET a=
SET b=HELLO WORLD
echo %b%
if [%a%] == [] echo "String A is empty"
if [%b%] == [] echo "String B is empty"
我得到的输出如下
HELLO WORLD
"String A is empty"
WORLD] was unexpected at this time.
为什么WORLD] was unexpected at this time.
出现在输出。你能指出错误吗?提前致谢。
比q那么多.. – METALHEAD