Merge multiple files into one new file in Windows

Reading Time: 1 Minute

A quicky: if you need to merge multiple text files into one new file in Windows, you can use copy on the cmd.exe command-line:

On your Windows cmd.exe command-line, use the following command to merge all text files in a directory into one new file:

copy /b *.log newfile.log
copy /a *.txt newfile.txt

The copy parameters /a and /b indicate ASCII text or BINARY files.

This is ideal for combining multiple log files into one file for LogParser and log forensics.



Hi! Join the discussion, leave a reply!