dat, etc, then you can simply change the *.txt value in the command. Note that if you have a text file, but it has a different extension like. TXT and outputs them to a file called output.txt.Īs you can see above, the loop just runs a separate command for each text file that it finds in the directory. In coding parlance, this is a simple FOR loop that loops through all the files end with. If I only want to combine the text files in this one folder, I would issue this command:įor %f in (*.txt) do type “%f” > c:\Test\output.txt As you can see above, I have three text documents in the folder along with a couple of folders. Now all we have to do is type in the command. This will open a command window that is already set to the directory you were in.
Now press and hold CTRL + SHIFT and then right-click on any empty spot in the Explorer window. If the files are stored in many subfolders, navigate to the parent directory.
#Text file merge tool how to#
I’ll explain the simplest command, but will also delve into a few examples to show you how to do the more complicated stuff.įirstly, open Windows Explorer and go to the directory where you text files are located. The advantage of using the command prompt is that you don’t have to install any third-party programs. If you want a little primer on using the command prompt, check out my beginner’s guide to use the command prompt.Īlso, since the command line can take multiple parameters, you can really create quite a complex command to filter and sort through which files you want to include in the joining process.
If you are ok using the command prompt, then there are a couple of simple commands you can use to merge a whole bunch of text files quickly.