Solved

vb.net - merge files

Posted on 2013-05-16
2
305 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 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 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