我想在下面的代碼中使用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