How to append text files using batch files

前端 未结 3 828
心在旅途
心在旅途 2020-12-30 22:39

How can I append file1 to file2, from a batch file? Text files and only using what is \"standard\" on windows.

相关标签:
3条回答
  • 2020-12-30 23:16

    You might get better results with the following:

    copy /b file1.txt+file2.txt result.txt
    

    I use this command to combine dozens of XML files together. The "/b" puts the copy process in binary mode. This eliminated the control character that was appending to the end of my destination file.

    0 讨论(0)
  • 2020-12-30 23:26

    It is as simple as

    type file1 >> file2
    
    0 讨论(0)
  • 2020-12-30 23:29
    COPY file1.txt+file2.txt result.txt
    
    0 讨论(0)
提交回复
热议问题