[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
本帖最后由 wpNature 于 2011-7-8 09:46 编辑

The ELSE clause must occur on the same line as the command after the IF.
For example:

IF EXIST filename. (
del filename.
) ELSE (
echo filename. missing.
)

The below example would NOT work because the del command needs to be terminated by a newline:

IF EXIST filename. del filename. ELSE echo filename. missing

Nor would the below example work, since the ELSE command must be on the same line as the end of the IF command:

IF EXIST filename. del filename.
ELSE echo filename. missing

The below example would work if you want it all on one line:


IF EXIST filename. (del filename.) ELSE echo filename. missing


PS:SEE MORE INFORMATION ABOUT ABOVE :http://www.computerhope.com/if.htm
一生的努力,才能求的灵魂的安宁。

TOP

返回列表