Recently I had to copy a file from my computer to my friends computer. It was of 8 MB and was huge
for one floppy. So, I created my own software for moving that file.
This software creates 1-9 segments of one file.
Creating a segment means making rewriting the same file. The segments are named as xxx.fa1, xxx.fa2 xxx.fa3 ... xxx.fa9.
It creates a file like xxx.faz which is the info file which holds information about the original file
that was segmented. To desegment a file back to original file, xxx.faz has to be opened and it
should be in the same directory where all the other segments are and the original file
will be created in the same directory.
How to use
There are only three functions
The concept is that to read a file's length and divide it into
as many segments as the user wants by opening it in binary mode and then writing the amount of
data to different segments.
CSegFile class supports two progress bars and one static control to provide information.
First create your progress bars on a dialog (with ID's
To use them, first add code like this into your program:
segFile.spStatic = (CStatic*) GetDlgItem(IDC_STATIC_INFO);
To open a file you can use code like
szFileName = fdl.m_ofn.lpstrFile;
m_currentFile = szFileName;
Then you can use this line for segmenting:
To desegment a file open the info file xxx.faz and call the the function like this one.
I tested it on my computer and my friend's computer. I had no means to check it on NT and
win2000. For comments and suggestions contact me at firstname.lastname@example.org
I'm a drop out of Chartered Accountancy at ICAP but currently continuing Managment Accountancy at CIMA (UK) but i do programming as hobby.
I usually work in C++, MFC, COM. Other languages/techs I like to play with are C#, VB, ASP, PHP, MSSQL, MySQL, Perl and Flash.
These days I usually play with Open Source Switch/PBX on Linux www.asteriskpbx.com and VoIP products.
I am currently based in Karachi,Pakistan.