@echo off
setlocal enabledelayedexpansion
set "v1=M204 H1 D1"
set "v2=G43 H1"
set "v3=M24"
set "v4=M26"
for %%a in (*.ptp) do (
findstr /i /v /c:"!v1!" "%%~a">new.tmp
findstr /i /v /c:"!v2!" new.tmp>"%%~a"
findstr /i /v /c:"!v3!" "%%~a">new.tmp
findstr /i /v /c:"!v4!" new.tmp>"%%~a"
del new.tmp)
这样的代码批处理很快,然后再加上替换HO1成H00(限于前十五行)