windows批次太冗长了

时间:2017-04-12 14:21:45

标签: windows batch-file

一旦Windows批处理执行此if语句,我就会面临太多的冗长:

IF EXIST a1.xml IF EXIST b1.xml IF EXIST c1.xml ECHO Please provide singed files into proper directory and wait....

一旦我执行了脚本,在我的w10 cmd窗口中,所有内容都会打印出来:

....
    D:\MyWork>IF EXIST a1.xml IF EXIST b1.xml IF EXIST c1.xml ECHO Please provide singed files into proper directory and wait....
....

如何通过批量打印仅打印ECHO部分中的内容 - 我只想看到:Please provide singed files into proper directory and wait....

提前支持

1 个答案:

答案 0 :(得分:0)

如果您将线路更改为:

,会发生什么
@IF EXIST a1.xml IF EXIST b1.xml IF EXIST c1.xml @(ECHO Please provide singed files into proper directory and wait....)

如果可以,请将其更改为两行,因为通常超过80个字符的长行很糟糕!

@IF EXIST a1.xml IF EXIST b1.xml IF EXIST c1.xml @(
    ECHO Please provide singed files into proper directory and wait....)