Home > OS >  Batch TXT file
Batch TXT file

Time:10-03

How to batch delete TXT file before six lines,
Want to use. Bat handle for Daniel to the code,
thank you

CodePudding user response:

@ ECHO OFF
: : set up to operate the folder path such as "d: " and delete the first N rows such as 3
The SET TxtDir="D: \ 123"
The SET/A, N=110000
ECHO began operating, please later...
TxtDir CD/D % %
FOR/F "tokens=1 delims=" % % I IN (' DIR/A/B *. TXT) DO ((MORE + % N % % % "I" & gt;" % % I_ ") & amp; (DEL/A/F "% % I/Q) & amp; I_ (REN "% %" % % "I"))
ECHO operation end
PAUSE

CodePudding user response:

Del - p - q
  • Related