Click here to Skip to main content
13,296,879 members (40,544 online)
Click here to Skip to main content
Add your own
alternative version


19 bookmarked
Posted 31 Mar 2005

VB.Net Text File Splitter

, 8 Apr 2005
Rate this:
Please Sign up or sign in to vote.
This simple project shows how to use the Stream Reader and Stream Writer to read and write files

Source Files: Download source code - 37.4 Kb

Screen Shot
Sample image


I was working on a much larger project when I realized I needed to make a huge text file smaller so I could load it into notepad easier, and still retain the the main format of the file.

I couldn't use a file splitter because it splits the file based on File size, and they tend to split the file in the middle of lines, and not at the end of the line.

So I went about writing a tiny application that will take a text file and split the file line by line until the number of lines in the new file is the size the user wants.

I have just made a slight modification 4/8/2005 that now allows the user to choose if they wish to split the file up by a certain number of lines or a cetain number of files. If the user chooses to split the file by a certain number of files the program will create the number of files with equal amouts of lines


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

George Oakes
Web Developer
United States United States
I have been developing software since 1995, and I enjoy it very much. My current position allows me to keep up with the latest technology, and it is refreshing.

I am married, and live with my wonderful wife, and our 2 lovely daughters.

I enjoy Woodworking, Fishing, Camping, and Auto racing. I live on the west coast of Florida and enjoy spending my free time outdoors, or building stuff in my workshop.

You may also be interested in...


Comments and Discussions

GeneralI needed a really fast solution and this one seems to do it. Pin
Doug Hill10-Jul-14 9:24
memberDoug Hill10-Jul-14 9:24 
Questionspeeding it up Pin
rudyman3-Aug-11 6:11
memberrudyman3-Aug-11 6:11 
GeneralCInt and Rounding Pin
pccat11-Apr-06 7:03
memberpccat11-Apr-06 7:03 
QuestionProblem with CInt function? Pin
pccat10-Apr-06 15:24
memberpccat10-Apr-06 15:24 
AnswerRe: Problem with CInt function? Pin
Luca Crisi, MCP4-Mar-10 6:38
memberLuca Crisi, MCP4-Mar-10 6:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171207.1 | Last Updated 8 Apr 2005
Article Copyright 2005 by George Oakes
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid