0

I need a .bat file compatible from windows 7 to windows 10 which concatenates 2 files

For example

file1.txt:

hello

file2.txt:

world

After running the batch script, a new file called file3.txt will contain the contents:

hello
world

A newline should be added after the contents of file1

Mad Max
  • 11

1 Answers1

1
type file1.txt file2.txt > file3.txt

Edit: Try this for the newline part:

echo. > newline.txt
type file1.txt newline.txt file2.txt > file3.txt
del newline.txt