0

Source file C:/Employee.txt is as follows

00 02/10/2012
01,ABC,Engineer,Toyota
01,DEF,Tech Lead,Toyota
99 02/10/2012 002
Where, 
first line is a header (00 - header)
Next two lines is a body (01-body)
Last Line is trailer (99-trailer)

I am trying to delete first line(header) and last line(trailer) of a file and storing body in another file using batch script.New file should be as follows

New File C:/New.txt 
01,ABC,Engineer,Toyota
01,DEF,Tech Lead,Toyota

Kindly help me out

user680204
  • 21
  • 2
  • 6

1 Answers1

1

use findstr to match 00 or 99 at the beginning of the line and print only non matched lines. help findstr will show you all switches, and there is an excellent description of the tool here

Community
  • 1
  • 1
wmz
  • 3,645
  • 1
  • 14
  • 22