Instructables
Picture of Make your own Free Cabinet Files (.cab)
ddf file.jpg
prompt.jpg
Like many people i have Thousands of old files that i rarely need to use but just cant do without.
By Archiving them into Cabinet files, you can save alot of disk space than you would by simply putting them into ordinary zip files, Making them ideal for old wedding photos, videos and so on.

You dont need any Special software for this simple 2 step procedure, all of the software is already installed on windows so this wont cost you a penny and with no risk of downloading anything harmful.

In Windows 2000 and all other versions since then like XP and so on, there is a Hidden Dos program called MakeCab.exe which allows users to create compressed Cabinet files, We cant open this program directly so we need to do some typing.

Cabinet files are like the Big Brother of Zip folders and are read only, you can still open them like you would any other Zip folder, they are just as easily sent over the internet and opened by someone who maybe doesnt have zip capabilities.


Step 1.

Choose your files that you want to Compress and put them in a folder, I used C:\files (change it to whatever suits you).

Now you need to create a directive file for the MakeCab.exe program.
The basics are listed below, In NotePad just copy and paste the following text and list the files at the bottom like i have.


.OPTION EXPLICIT ; Will Generate errors for mistakes
.set DiskDirectoryTemplate=CDROM ; All cabinets go into a folder
.Set CompressionType=MSZIP ;** All files are compressed to cabinet files
.Set UniqueFiles="OFF"
.Set Cabinet=on

; Destination Folder
.Set DiskDirectory1=c:\cabinets

; File name for the new cab file
.Set CabinetNameTemplate=Sample.cab

; Files to be added are listed below
c:\files\a.txt
c:\files\b.txt


In the menu click Save As, Where it says 'Save as Type:' change it to All Files, Save it as c:\a.ddf .

Everything that follows the ; semicolon is treated as a comment and ignored by the compiler, you dont need the comments in the actual file but it will help you understand what you typed and where to put stuff.

Step 2.

Open the start menu and click run, Type cmd and click ok.

You should now see the command prompt window, type the following:

makecab /f c:\a.ddf

If youre Successful some information should appear and the folder c:\cabinets will be created with your file inside of it, if you do get errors the cabinet file wont be created, look at the errors listed and you should easily understand them enough to correct any mistakes and try again.

If you only want to compress a single file then skip the first 2 steps and in command prompt type.

makecab C:\files\simple.txt c:\Cabinet.cab

This compresses the simple.txt file into a file called Cabinet.cab



And thats it, Now you can Archive to your hearts content.




.                  *** Thanks for taking the time to view my instructable***

.       Please leave a comment and a rating if you found this information useful.


.                            ********************************************














I have succeeded using a GUI for makecab.exe that genertates a proper ddf file before creating the archive. The Program is called Cab File Maker 2.0 and it is available from http://www.filecluster.com/downloads/Cab-File-Make... Here is the ddf file that it generated for me:

.Option Explicit

.Set Cabinet=on

.set Compress=on

.Set MaxDiskSize=CDRom

.set ReservePerCabinetSize=6144

.Set DiskDirectoryTemplate=

.Set CompressionType=MSZip

.Set CompressionLevel=7

.Set CompressionMemory=21

.Set CabinetNameTemplate="SWFLASH.cab"

"C:\SWFLASH\Flash32_14_0_0_125.ocx"

"C:\SWFLASH\FlashPlayerApp.exe"

"C:\SWFLASH\FlashPlayerCPLApp.cpl"

"C:\SWFLASH\FlashPlayerUpdateService.exe"

"C:\SWFLASH\FlashUtil32_14_0_0_125_ActiveX.dll"

"C:\SWFLASH\FlashUtil32_14_0_0_125_ActiveX.exe"

"C:\SWFLASH\mms.cfg"

"C:\SWFLASH\swflash.inf"

I have tried this using POSREADY 2009 as my OS, but although it seemed to work without error messages I found that only one of eight files had been added to the archive.

smartboyind2 years ago
Dear Sir,
I am using vista sp1 32bit. I have tried the above steps but failed to make a .cab file. I can't save a c:\a.ddf file because the save window says you don't have permission to do so. I think the "\" is making problem while saving. Could you please explain in detail about step2 and 3. If i save the ddf file to my desktop, what will be the pathname? The steps you have given is simple but somewhere i stuck on the way. I can't figureout the fault without your help. Hope you may help me.
Thanks Million
DeanGPotts (author)  smartboyind1 year ago
Thank you for the message, i havent had any experience with vista, i currently use win7 but it shouldn't make any difference what version you use.
try once more by using notepad to save the file as a.ddf in your c:\ drive
then goto run and type cmd and enter makecab /f c:\a.ddf please note the spaces before and after /f.
the only other thing i can think of that would be a cause, is Vista doesnt reccognise you as the system administrator and just a basic user.
my brother has had alot of problems when trying to run a program, he has the same permission error.
i will try his computer and update this instructable.