Home > OS >  Could you tell me how to delete the specified character in batch, line, and later, the line 1
Could you tell me how to delete the specified character in batch, line, and later, the line 1

Time:02-12

How can I delete the specified character of line 1 and the following line, and not to delete the front row of Spaces and blank lines?
In front of the command will remove the Spaces and blank lines, and then delete the original characters in the line and a line below, seek help from a great god, thank you!
@ echo off
Setlocal enabledelayedexpansion
The set of fn=111. TXT
The set findstr searches=ABC
Del temp. TXT 2 & gt; Nul
Fn ren % % temp. The TXT
For/f "tokens=1 delims=" % % I in (' findstr searches ^/n % findstr searches % temp. TXT ') do set the I/a m=% %
The set/a, n=0
The set/a c=m
The set/a e=m + 1
For/f "tokens=*" % % j in (temp. TXT) do (if! n! Echo LSS % c % % % j
If! n! Echo GTR % e % % % j
)> Fn % % & amp; & The set/a n +=1
The type 111. TXT
pause
  • Related