Next Generation Emulation banner
1 - 4 of 4 Posts

sb iq

· Registered
Joined
·
26 Posts
Discussion starter · #1 · (Edited)
Here is my problem:

I have a file with raw data that is 18304 bytes. It is raw, no file extension. I need to split my file into smaller 768-byte files. This means I should end up with 71 files that are 768 bytes, and one file that is 384 bytes.

Now, obviously, I sure as hell don’t want to open up my file in Notepad or Hex Workshop, and cut and paste data into new files 72 times. I’d get carpel-tunnel syndrome and probably go insane.

I need to write a C++ program that will do this for me.

The problem is it’s been years since I’ve taken a C++ course and I forgot a lot, and I mean a lot (I'm still waiting for my C++ study guide to come in the mail).

How should my code look like? Can someone explain this to me?

Also, what is the best free C++ compiler program for XP? I lost my Microsoft Visual C++ installation CDs years ago. :(

Any help would be greatly appreciated, as I sure as Hell don’t want to cut, paste, and save files over and over again 72 times.
 
There *are* file splitters available for free. HJSplit is the top google match. And yes, you *can* tell it to split by file size.

If you can't buy a new VC++ flavor then just get Mingw32 that comes with Dev-Cpp for starters.
 
Discussion starter · #3 · (Edited)
Thanks, but the problem is, HJSplit won't divide it if the segments are less than a kilobyte. :(

I also tried something called The File Splitter 1.31. It only split it up into 24 files, each 640 bytes each. Obviously not what I wanted.

Are there any other free, competent file splitter programs out there?

Also, are there programs that can join files together? Because after I split up my files, I gotta make changes to each of the segments, and then take those files and put them back into one big file.
 
1 - 4 of 4 Posts