'其他'不被识别为一个内部或外部命令,可操作的程序或批处理文件 [英] 'else' is not recognized as an internal or external command, operable program or batch file
本文介绍了'其他'不被识别为一个内部或外部命令,可操作的程序或批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试用其他命令来使用,但我得到的foloowing错误:
I try to use with "else" command but I get the foloowing error:
'其他'不是内部或外部命令,
可运行的程序或批处理文件。
我的code是:
if "zz"=="TRUE" (
copy /a zz + /a ee=/a zz
)
else (
copy /a e + /a %TMP%=/a e
)
什么问题?
推荐答案
的其他
需要在同一行(一)为如果
。前取出新行其他
像这样:
The else
needs to be on the same "line" (a) as the if
. Remove the new-line before the else
like so:
if "zz"=="TRUE" (
copy /a zz + /a ee=/a zz
) else (
copy /a e + /a %TMP%=/a e
)
另外请注意,ZZ==TRUE
将永远不会计算为真正
- 我怀疑你意味着ZZ%%==TRUE
?
Please also note that "zz"=="TRUE"
will never evaluate to true
- I suspect you meant "%zz%"=="TRUE"
?
(一):这并不总是一个很好的说明,但它是微软的文档使用什么。同样的命令的可能是更好的,并把)
和其他
在不同的换行符入的两个的命令。
(a): This isn't always a good description, though it's what the Microsoft documents use. Same command may have been better, and putting )
and else
on a different line breaks it into two commands.
这篇关于'其他'不被识别为一个内部或外部命令,可操作的程序或批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文