Share via


cabinet file with multiple files

There are 3 simple steps to create a cabinet file with multiple files.

1. Create a folder with all files that you want to include in cabinet file.

2. Create a directive file using a template. Fill the name of the files to be included in that cabinet. (detail is given below)

3. Run MakeCab in command line.

 

Simple directive file mentioned in step#2 looks like this. Notice that files to include are written in bold.

----------------------------------------------------------------------

;*** Sample Source Code MakeCAB Directive file example
;
.OPTION EXPLICIT ; Generate errors
.Set CabinetNameTemplate=SampleCab.cab      
.set DiskDirectoryTemplate=CDROM ; All cabinets in a single directory
.Set CompressionType=MSZIP;** All files are compressed in cabinet files
.Set UniqueFiles="OFF"
.Set Cabinet=on
.Set DiskDirectory1=SAMPLECAB.CAB
file1.xml
file2.dwp
file3.dll
;*** <the end>

----------------------------------------------------------------------------

after creating the above directive file in notepad, save it with .ddf extension (say xxx.ddf).

Run the following in the commandline to create the cab file:

MakeCab.exe /F xxx.ddf

 

If there is any error in creating cab file, it will throw an error with line number in parentheses.