How to add the contents of one text file to another text file using batchscript?

How to create a simple batch script in windows that will contain the contents of one txt file and add it to the end of another text file

+4
source share
2 answers

A type command can be used to concatenate files. Try

type file1.txt >> file2.txt 
+6
source

Brett's answer works well. Another alternative is

 copy file1.txt + file2.txt /b 

You can add any number of files with this syntax by adding additional files.

The /b switch prevents the end of the <ctrl-Z> end of the file from being added to the end of the file after the copy.

+4
source

Source: https://habr.com/ru/post/1412583/


All Articles