append 4 text files to 1

smithsf22

Member
Joined
Jul 15, 2004
Messages
8
Programming Experience
Beginner
Hello, I am kind of new to programming and I am trying to figure out some stuff. I have 4 text files that I have copied over from a server; I now want to copy all the data from the 4 text files into a new temp.txt file while keeping the formatting of the originals. If anyone knows of good how to doc on the subject or any useful hint it would be greatly appreciated.



Thanks in advance
 
Use a System.IO.TextReader to read each file into either a string (or use a stringBuilder) and concatenate the 4 textFiles together. Then use a System.IO.TextWriter to write the string (or contents of the stringBuilder) to the new temp.txt file.
 
Back
Top