I am thinking looking for a way to combine all the .txt
files in a directory into a single one .txt
file.
Is there a way to combine text files using the Windows command line?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityYou can also use the copy command, eg
copy *.js bigfile.txt
or, for specific files
copy file1.txt+file2.txt+file3.txt bigfile.txt
type * > someotherpath/all.txt
The need for creating the file somewhere else is that if the new file is created on the same folder, it should be excluded from the selection.
Also, filtering by extension and using a different one for the resulting file would work. For example:
type *.js > all.txt