Script command line to remove the title bar from multiple TXT files

What is the best way to remove the first line of text from a large (10k +) group of text files.

+5
source share
4 answers

If PowerShell is not a parameter, you can use the command more:

more [file] +2 > [new file]

Stick in a loop forthat also renames [new file]to [file]and you will have a file minus the first line.

Not really, but should work.

+3
source

If you can install TAIL in your sistem

tail -n +2 filename > finalfilename

shows all file names except the first line.

CMD, , "". tail. , more, .

, buil-in.

, , , , bat.

, Windows, cygwin, powershell console, .

+1

PowerShell - , : Powershell

0
source

load sed for windows . Then do it

c:\test> sed -i.bak "1d" file

use for loop to iterate files

0
source

All Articles