I ran into a problem where I had a zip file that had a document I wanted to copy split into 100 different .txt files. I needed to combine all of the text files into one large file so I could copy all the data.
Windows
You can combine text files in Windows using copy’s binary mode. From the command prompt navigate to the folder with the .txt files and run the following command:
copy /b filename* all.txt /b
Where filename* matches the pattern of your file names and all.txt is the output file.
Mac / Linux / Unix
You can combine files in the unix shell using cat and appending the output to a file:
cat filename* > all.txt
Where filename* matches the pattern of your file names and all.txt is the output file.
This should help save someone a lot of copy and pasting time.
Johnathan Ward is an experienced developer and consultant that writes tutorials to help other developers. In his day job, he is an IBM Watson Consultant with several years of experience deploying and customizing Watson Explorer solutions.