Batch File to remove first 3 lines of csv file -


I'm looking for a way to remove the first 3 lines of text from a CSV file, call reports. A batch script

My CSV has 3 header lines

  ReportName's time & lt; Blank line & gt; Do anyone know how I can complete it and just change the original file?   

Unless you have a true CSV, and there is no tab delimited file, do the following (A tab will change in 8 places)

  @echo off set "csv = test.csv" more +3 "% csv%" & gt; "% Csv% .new" move / Y "% csv% .new" "% csv%" & gt; Nul   

If your file contains tabs, and you do not have to protect the empty lines, the following will work, but this is slow.

  @echo set off "csv = test.csv"> For "% csv% .new" (/ f ^ ^ ^ 3 ^ usebackq ^ delims ^ ^ EOL ^ = %% ("% csv%"), %% A copy) / y "% csv% .new ""% csv% "& gt; Null    

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -