Home > Mobile >  how to remove first line from a huge text file - windows cmd
how to remove first line from a huge text file - windows cmd

Time:10-22

how to remove first line in a super huge text file (min lines: 65536), using CMD (without any installing)?

example input file:

line1
line2
line3
line4

output file after I run the CMD:

line2
line3
line4

I have tried

more  1 "input.txt" > "output.txt"

but the max limit line in text file is 65535.

thank you all in advanced.

ps: super newbie in coding scripting.

CodePudding user response:

It is not the most efficient in CMD, but this should work in powershell:

get-content input.txt | select -Skip 1 | set-content "output.txt"

CodePudding user response:

SET "sourcedir=u:\your files"
SET "destdir=u:\your results"
SET "filename1=%sourcedir%\hugefile.txt"
SET "outfile=           
  • Related