You are here:

C/how to create an exe file?

Advertisement


Question
Sir,
   I want to create an exe file on executing my own c program. I want to do this because i m in effort of writing a file splitter program. In that, when files are splitted, the corresponding remedy to join them is also to be done(In a machine there is not my program to be joined again) So i decided to generate an exe file and export it along with the splitted pieces so that they can be easily joined on running the exe only. Please intimate a suitable way to do this one.

Answer
What type of file are you splitting? Is it binary or ascii?
Take as input the filename and number of files that it has to be split into.
Then findout the total size and divide that into number of parts based on number of splits requested.
Then generate filenames for the split files.
Use this information and split the files.
Then in the exe for joining, add these filenames also, join into a new file (original name) and delete the split files.

-ssnkumar

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Narendra

Expertise

I can answer questions in C related to programming, data structures, pointers and file manipulation. I use Solaris for doing C code and if you have questions related to C programming on Solaris, I will be able to help better.

Experience

6.5

Organizations belong to
Sun Microsystems

Awards and Honors
Brain Bench Certified Expert C programmer.
Advanced System Software Certified

©2012 About.com, a part of The New York Times Company. All rights reserved.