delete a line and data truncation

Dell / Poweredge server
April 9, 2009 at 09:11:08
Specs: Windows 2000
when I use MORE or TYPE command in my Windows batch script to remove the first line from a text file like this:

type Filename.txt | find /v "FILEHEADER" > Newfile.txt

it would remove the first line. But it would also truncate any data after position 1024 on a line when it writes to the newfile. What can I do (or what's the best way) to prevent this truncation?

See More: delete a line and data truncation

Report •

April 9, 2009 at 09:25:06
It may be a limitation of TYPE but there's no need to use type in the first place.

find /v "FILEHEADER" < Filename.txt > Newfile.txt

If at first you don't succeed, you're about average.


Report •

April 9, 2009 at 19:06:02
if you want to remove first line, you can also use the more command
c:\test> more +2 file > newfile

Unix Win32 tools | Gawk for Windows

Report •

Related Solutions

Ask Question