Tuesday, January 3, 2012

How to merge two files using the command line

Use the "copy /b" command as explained here:

copy /b "list of old files or * for all files" "newfile"

For example, to join file1.txt, file2.txt and file3.txt together to new file: file4.txt use:

copy /b file1.txt +file2.txt +file3.txt file4.txt

or:

copy /b *.txt newfile.txt

No comments: