Tuesday, June 18, 2013

How do I concatenate text files on Windows?

Strangely enough, I've had this same question asked of me twice within the last week, so I figured I'd post it here.

At the command prompt, use this command:
type *.txt > outfile

If you name outfile with the extension .txt, you'll actually wind up with stuff duplicated because the *.txt will cause the output file to be input, too!


No comments:

Post a Comment