?
Solved

vb.net - merge files

Posted on 2013-05-16
2
Medium Priority
?
307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

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…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

770 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