批量 - 打印回声关闭

时间:2014-09-29 22:13:03

标签: batch-file

我有以下代码:

@ECHO OFF
FOR /F "tokens=*" %%A IN (%ThisService_WorkingDirectory%MPMissions\%ThisService_mapname%\init.sqf) DO (
  ECHO %%A
  IF "%%A" EQU "DZE_BuildOnRoads = false; // Default: False" (
    TYPE D:\god-bases\god-bases.txt
  )
) >> temp.txt
move /y temp.txt %ThisService_WorkingDirectory%MPMissions\%ThisService_mapname%\init.sqf

如何在空白区域中禁止打印“Echo is OFF”?

1 个答案:

答案 0 :(得分:2)

echo %%A更改为echo(%%A

这样可以避免几乎所有可能的%% A组合问题 <empty>ON/?