Concatenating Mulitple Text Files

Started by jtrask, June 03, 2015, 07:04:13 AM

Previous topic - Next topic

jtrask

The consensus on the Internet seems to be that the best way to concatenate multiple text files into a single file, read each text files one at a time, and write the contents of each to the new file.  Some methods seem fancier than others, but they're  each just doing this same thing. 

Is this indeed the way to go?

JTaylor


jtrask

Thank you.  How did I not know about this?  It was so much easier than the other method, and faster too.

DAG_P6

In a batch file, you can string them together with plus signs; I have concatenated up to about four files this way.

One thing to be aware of is that a simple concatenation of delimited ASCII files that have column labels in their first row is unwise, unless the application that uses the concatenated file handles embedded label rows gracefully. This is a problem that has arisen so often for me that I created ManyCat.exe, a custom tool that performs this task correctly, so long as all files contain the same columns, in the same order.
David A. Gray
You are more important than any technology.