批处理文件“,”无法识别
Batch File "," is not recognized
这是我收到的比较模糊的 Windows 批处理错误之一。
在批处理文件中(第一行也是唯一一行代码):
CALL IF "%1"=="" (ECHO TRUE) ELSE (ECHO false)
returns
',' is not recognized as an internal or external command,
operable program or batch file
我知道这不是调用 if 语句的最佳方式,但有人知道解释器试图做什么吗?
顺便说一句,这也适用于命令提示符,if
正在测试的内容似乎无关紧要。无论发生什么,似乎都由 CALL IF
调用
问题已在此处讨论:Why I can't CALL "IF" and "FOR" neither in batch nor in the cmd?
这是因为 CALL 和 IF 解析器(尤其是阶段很少的 IF),但由于我们没有命令提示符源,我们不知道为什么会发生这种情况。
这是我收到的比较模糊的 Windows 批处理错误之一。
在批处理文件中(第一行也是唯一一行代码):
CALL IF "%1"=="" (ECHO TRUE) ELSE (ECHO false)
returns
',' is not recognized as an internal or external command,
operable program or batch file
我知道这不是调用 if 语句的最佳方式,但有人知道解释器试图做什么吗?
顺便说一句,这也适用于命令提示符,if
正在测试的内容似乎无关紧要。无论发生什么,似乎都由 CALL IF
问题已在此处讨论:Why I can't CALL "IF" and "FOR" neither in batch nor in the cmd?
这是因为 CALL 和 IF 解析器(尤其是阶段很少的 IF),但由于我们没有命令提示符源,我们不知道为什么会发生这种情况。