Do you know somehow to achieve this in Windows?

I am thinking about a few commands that will combine all the txt files in a directory into a single one.

link|improve this question
feedback

2 Answers

up vote 8 down vote accepted

You can also use the copy command, eg

copy *.js bigfile.txt

or, for specific files

copy file1.txt+file2.txt+file3.txt bigfile.txt
link|improve this answer
+1 - This also allows you to decide what order to have the combined result set in. – JNK Sep 21 '10 at 20:51
Good, thanks... – DanC Sep 23 '10 at 20:08
feedback
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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.