Delete the first lines from a text file using the command line

Posted by Unknown Rabu, 11 September 2013 0 komentar
Introduction
I often use CSV (Comma Separated Values) files that unfortunately have title text on the first three rows - I don't need this. I just need the header row which always starts at row four. In Excel of course I can just delete the unwanted rows but what if I want to do this from the command line? It might be useful if I would like to automated working with CSV files.


Instructions
Open a command line window (CMD).
Type the following command:
MORE /E +3 original.csv > new.csv  [Enter]

The original.csv has three first lines that I want to delete.
The new.csv does not have the first three lines.


Explanation
The +3 parameter means that it will delete the first three lines of text from the file. You can change this to however many lines (rows) you want to delete. The 'original.csv' is your original source file with the lines that need to be deleted. The > means to output to a new file called new.csv. Of course you can use different file names, the names I've used are just examples.
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: Delete the first lines from a text file using the command line
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke https://apk-zippy.blogspot.com/2013/09/delete-first-lines-from-text-file-using.html. Terima kasih sudah singgah membaca artikel ini.

0 komentar:

Posting Komentar

Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of apk zippy.