Solved

vb.net - merge files

Posted on 2013-05-16
2
303 Views
Last Modified: 2013-05-30
Hello,
I have about 30 txt files, each file is about 5GB in size.
these text files are basically huge percause they are not compressed and they contains records line by line like this

name1560
name16598
name89865

I would like to know what would be the best approach to merge all these files into one?
0
Comment
Question by:XK8ER
2 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 39174229
to get a 15 gb file? isn't it too big?
0
 
LVL 15

Accepted Solution

by:
angus_young_acdc earned 500 total points
ID: 39174315
That's going to be a massive file!  

Anyway what I would do is split the files down further so that any reads can manage the load.  Then, read each of the smaller files using a StreamReader and write the contents to a single file using StreamWriter (append true).  

It may struggle somewhat as it gets into the 10's of GB, but I've never had to create a text file so large so I can't confirm that.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question