Concatenate text files with Windows command line, dropping leading lines

前端 未结 12 922
心在旅途
心在旅途 2020-11-30 18:03

I need to concatenate some relatively large text files, and would prefer to do this via the command line. Unfortunately I only have Windows, and cannot install new software.

12条回答
  •  星月不相逢
    2020-11-30 19:04

    This takes Test.txt with headers and appends Test1.txt and Test2.txt and writes results to Testresult.txt file after stripping headers from second and third files respectively:

    type C:\Test.txt > C:\Testresult.txt && more +1 C:\Test1.txt >> C:\Testresult.txt && more +1 C:\Test2.txt >> C:\Testresult.txt
    

提交回复
热议问题