Click here to Skip to main content
15,889,462 members
Articles / Programming Languages / Visual Basic
Article

VB.Net Text File Splitter

Rate me:
Please Sign up or sign in to vote.
2.05/5 (11 votes)
8 Apr 2005 69.5K   3K   20   5
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

License

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


Written By
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 enjoy Woodworking, Fishing, Camping, and Hunting. I live on the west coast of Florida and enjoy spending my free time outdoors, or building stuff in my workshop.

Comments and Discussions

 
GeneralI needed a really fast solution and this one seems to do it. Pin
Doug Hill10-Jul-14 8:24
Doug Hill10-Jul-14 8:24 
Questionspeeding it up Pin
rudyman3-Aug-11 5:11
rudyman3-Aug-11 5:11 
GeneralCInt and Rounding Pin
pccat11-Apr-06 6:03
pccat11-Apr-06 6:03 
QuestionProblem with CInt function? Pin
pccat10-Apr-06 14:24
pccat10-Apr-06 14:24 
AnswerRe: Problem with CInt function? Pin
Luca Crisi, MCP4-Mar-10 5:38
Luca Crisi, MCP4-Mar-10 5: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.