Batch file to split a large file into 50MB cabinet files using MakeCab?

CZroe

Lifer
Jun 24, 2001
24,195
857
126
I'd like to make a batch (BAT) file that can split a large file into multiple smaller files... like, say, 50MB. I know it's possible because MS split all CABs into *exactly* 1.44MB in earier versions of Windows for easy backup onto floppy disks. The in-built command line utility appears to be "MakeCab." What little documentation I can find on MakeCab appears to be meant for a "directives" (DDF) file. I've tried passing them to MakeCab with the in a text file with the /F switch and it just generates an INF file. I think it's meant for inclusion in an installation program, like an MSI file.

Because there doesn't seem to be a way to split files using the command line without any additional programs not included with Windows (despite being able to merge them), this appears to be the next best thing to relying on another program. I'd really like to know how to do this for future reference. Thanks!
 

tcsenter

Lifer
Sep 7, 2001
18,799
471
126
The 1.44MB CAB files were floppy images, not 'split' files. Splitting a file and separating individual files are different things. A disk image is yet another different thing.
 

CZroe

Lifer
Jun 24, 2001
24,195
857
126
The 1.44MB CAB files were floppy images, not 'split' files. Splitting a file and separating individual files are different things. A disk image is yet another different thing.

No, I'm pretty sure that they were *.CAB files and I have seen the documentation related to making them and I have seen devs complaining about the 1.44MB default that they set to "0" to make one large CAB (the command line tool on its own always makes one large CAB file though). They 1.44MB Windows CAB files weren't simply archives with files arranged conveniently to be 1.44MB. It was pretty similar to WinRAR splitting up an archive into 1.44MB files except that you could extract them with a command line and no additional applications. I even read something about how a CAB can have up to 15 files split into another CAB.
 

Emulex

Diamond Member
Jan 28, 2001
9,759
1
71
really you can't figure out how to split a file using powershell (cmd line) and recombine it? if it wasn't to early i'd bust out script. powershell is extremely powerful.
 

CZroe

Lifer
Jun 24, 2001
24,195
857
126
really you can't figure out how to split a file using powershell (cmd line) and recombine it? if it wasn't to early i'd bust out script. powershell is extremely powerful.

Got time now? :)

powershell /? isn't very helpful.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
powershell is extremely powerful.

But sadly it's a really shitty shell, despite the name. And I don't think it was included with any Windows release before Win7.

The built-in copy command can combine files, but I can't remember what command will split them up for you.