C/how to create an exe file?
Expert: Narendra - 11/3/2004
QuestionSir,
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.
AnswerWhat 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