How to Concatenate Multiple Files Using Batch Script
In this article, we will see how we can concatenate multiple files into one file.
Concatenate Multiple Files Using Batch Script
The general format of the command we will use is shown below.
type FileONE.txt FileTWO.txt > ConcatFile.txt
There are two ways to use this command. Let’s see them using an example.
This example will concatenate two files named FileONE.txt
and FileTWO.txt
into one file.
type FileONE.txt FileTWO.txt > TEST.txt
If you are dealing with many files, you can use this command below. This example concatenates all the files with the type .txt
in one file.
type *.txt > TEST.txt
All of the method we discussed above is only for Windows CMD.
Aminul Is an Expert Technical Writer and Full-Stack Developer. He has hands-on working experience on numerous Developer Platforms and SAAS startups. He is highly skilled in numerous Programming languages and Frameworks. He can write professional technical articles like Reviews, Programming, Documentation, SOP, User manual, Whitepaper, etc.
LinkedIn