Merge two files line by line in DOS

Asked By 10 points N/A Posted on -

In DOS, merge two files line by line is not easy for me so I am seeking some advice on how to make my life simple. TechyV users, please help me!

Answered By 30 points N/A #167562

Merge two files line by line in DOS



Hi there,
I am afraid there is no option to successfully merge files line by line using DOS commands. You can easily merge documents using the copy/b command.
If you have files named first.txt, second.txt and third.txt the command line goes like this:
copy/b first.txt +second.txt +third.txt new.txt
(new.txt is the new file that will be created containing all 3 documents and you can name it whatever you like)
For line by line merging you will need a program or a scripting language (like VBScripts, Powershell or Python).

Login/Register to Answer

Related Questions