Split a text file into smaller parts

At work we kept getting some log files from our customer that was between 700 and 900 MB. In other words, too big to open in Notepad. There are a few viewers/editors out there that lets you open huge files, but they tend to be very slow.

I did find some utilities for splitting up files, but the ones I came across had the option to specify the amount of files you wanted. What I wanted, was to specify the file size, and have the utility split the original into the necessary number of files.

I didn’t really look that hard. When I didn’t find it on the first 2 pages of Google, I decided to make my own this weekend. 😉

When using it, and you only specify the file name, it will divide it into chunks of 50 MB. If the original is smaller, it will do nothing. If you want other sizes, you can specify a second parameter with the number of bytes you want in that file.


SplitFile errorlog.txt  (will split file into chunks of 50 MB)

SplitFile errorlog.txt  100000  (will split file into chunks of 100 kB)

Please note that to run this application, you need to have the Microsoft .Net Framework 4.0 installed.
(You can get the framework for free right here.)

PS: If you’ve used this utility to split a file before transfer, and you want to merge them back into the original, you can do so with the following command from the prompt:  copy  *.split  target.txt

Download link: SplitFile