Click here to Skip to main content
Click here to Skip to main content

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

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

Share

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.

Comments and Discussions

 
GeneralI needed a really fast solution and this one seems to do it. PinmemberDoug Hill10-Jul-14 8:24 
Questionspeeding it up Pinmemberrudyman3-Aug-11 5:11 
GeneralCInt and Rounding Pinmemberpccat11-Apr-06 6:03 
QuestionProblem with CInt function? Pinmemberpccat10-Apr-06 14:24 
AnswerRe: Problem with CInt function? PinmemberLuca Crisi, MCP4-Mar-10 5:38 

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

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

| Advertise | Privacy | Mobile
Web03 | 2.8.140821.2 | Last Updated 8 Apr 2005
Article Copyright 2005 by George Oakes
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid