Wednesday, June 20, 2012

Concatenate Multiple Files on the Windows Command Line

If the files are small in size, and you have a small number of them:
type file1.txt > out.txt
type file2.txt >> out.txt
type file3.txt >> out.txt
If you have a large number of large files, this might be a better option:
copy /b file1.dat+file2.dat+file3.dat out.dat /b
copy /b *.dat out.dat /b