Click here to Skip to main content
15,850,190 members
Articles / Programming Languages / C#

Split Files

Rate me:
Please Sign up or sign in to vote.
4.49/5 (47 votes)
2 Aug 2008CPOL3 min read 61.3K   4.7K   36   15
Split huge files into many small pieces as specified by the user.


This is a simple but useful utility developed using C# which runs under Microsoft .NET Framework v2.0 or higher. This tool helps in splitting huge files into many small parts and merge them at any time and use it. This is a technique of separating the file bytes into a specified size.

Using the demo

To use the demo application, open "SplitFile.exe" from the demo link above. Click File --> New Project, and then save the project at any location at your wish. This project file can be used to resume the splitting process in future, if interrupted in between. Then, click the Browse button to select the source file (the huge file which has to be split). Now, a new panel will be visible at the bottom which shows the total size of the source file in bytes, and the remaining size indicates the remaining size to be split, which is updated after adding or removing each file.

Image 1

In the above window, click on the Browse button to add the part name and location. And then, enter the size of the new part, and then click Add Part button so that the part will be added to the list and the remaining size will be updated. Do this step continuously till the remaining size is 0. Increase the buffer size to increase the speed of the process. Then, click on the Start button to start splitting the file. This process does not damage the source file.

Note: Select the checkbox Create Merge file to Join parts to create a batch file to merge the split parts. The batch file will be created at the same location as that of the project file, containing the name of the project file as prefix. While merging the file using "Merger.bat", all the parts and the batch file must be placed in the same folder.

Using the source code

The description of the source is given line by line wherever necessary as comments.

Points of interest

This tool can be used to split any types of file (e.g., video, audio, graphics, images, executables [*.exe], text files, etc.).

The process can be stopped at any time, and can be resumed whenever needed.

To resume the stopped process in future, just drag and drop the project file to the icon at the desktop, or open the application, click File --> Open Project, and then select the project file (*.sp), and click the Start button.

While the splitting process is running, the Close button will not exit the application; instead, it will be minimized to the tray so that accidentally exiting the application will be avoided.

When you resume the project in future, if the source file has been moved or changed, then the application will prompt to select the old source file so that the parts will always be the same as that of the source file.

Bug reporting

In case of any bugs or suggestions to improve the project, feel free to contact me at "". If you report bugs, the application will be updated and your name will be added, with details about the bug you found, in the History section provided below. When you report bugs, please send your project files along with them.


  • August 05, 2008
    • New functionality to shutdown the computer with force and for normal shutdown has been added.
    • New functionality to show the approximate time to complete the task has been added.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Software Developer
India India

Completed B.Com(CS) at DGVC and GNIIT Software Engineering at NIIT. Resident at Chennai and working as a Software Engineer.

 Language / Technology :

C#, ADO.NET, ASP.NET, MVC, WCF, ASP, PHP, XML, Java, J2EE, HTML, JavaScript, JQuery, AngularJS, VB Script, C++, MS SQL Server, SSRS, MySql, Oracle, Oracle Forms Development, Windows, Linux.

Click here to view other articles.

Mail Me at:

Visit my Site:

Comments and Discussions

GeneralMy vote of 5 Pin
noreply-thephoenixprod7-Jun-11 20:10
noreply-thephoenixprod7-Jun-11 20:10 
GeneralMy vote of 1 Pin
SteveKuznicki1-May-09 12:22
SteveKuznicki1-May-09 12:22 
AnswerRe: My vote of 1 Pin
SHRIDHAR TL17-May-09 7:55
SHRIDHAR TL17-May-09 7:55 
I don't think this as a valid reason. The application requires the code to maintain its standard. I agree that the application is little bit complex and can be simplified, but when the viewers try to understand the complex application they increase their programing skill where as the simple application will make them just copy the code and use it without knowing more about it [spoon feeding wont be a permanent solution for anybody].

GeneralMy vote of 1 Pin
sudhir_Kumar15-Mar-09 22:23
sudhir_Kumar15-Mar-09 22:23 
GeneralRe: My vote of 1 Pin
SHRIDHAR TL17-May-09 8:04
SHRIDHAR TL17-May-09 8:04 
GeneralQuite a few issues... Pin
PSU Steve11-Aug-08 11:18
professionalPSU Steve11-Aug-08 11:18 
GeneralRe: Quite a few issues... Pin
SHRIDHAR TL11-Aug-08 17:24
SHRIDHAR TL11-Aug-08 17:24 
GeneralNice work Pin
Mohammad Dayyan7-Aug-08 13:26
Mohammad Dayyan7-Aug-08 13:26 
GeneralGreat Job!! Pin
ixup4-Aug-08 1:41
ixup4-Aug-08 1:41 
GeneralLooks Good !!! Pin
Abhijit Jana3-Aug-08 2:41
professionalAbhijit Jana3-Aug-08 2:41 

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.