2017-04-12 52 views
-1

林面临太多冗长一旦Windows批处理正在执行这个if声明:Windows批处理太多冗长

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....

thx支持在广告中万斯

+3

在脚本的开头放置'@echo off'。 – npocmaka

+0

@echo off不起作用 - 如果我设置此信息被完全抑制 – JosiP

+0

是脚本中的任何地方'echo on'?可能会更大的代码片段将有所帮助。 – npocmaka

回答

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....)