Wednesday, October 19, 2005

MakeCab : Part 1 - Compress single file

Makecab is a utility mainly used for packaging setup program and compression.

For the discussion of this blog, I will only focus on compression. Makecab is a handy tool to compress files. Makecab come with Windows XP and Windows Server 2003(not sure about Windows 2000) and both OS recoginze the CAB file and able to extract it without any compression utility installed.

I found this very useful when I work on production server where there is no compression utility like Winzip is installed. For example, there was once I need to copy a database file which is about 250MB to another PC and to my thumb drive. It is a huge file to copy. So I use MakeCab to compress the file before copying it out.

However, Makecab is a command line utility and using it is not that straight forward.

I will walkthrough 3 scenario of using Makecab to compress file.
1) Compress single file.
2) Compress multiple files in the same folder.
3) Compress multiple files in multiple folders.

It is very straight forward to compress a single file. Go to your command line and run the following command:

makecab your_source_file cab_file_name.cab


For example, to compress a readme.doc to readme.cab, the command is :

makecab readme.doc readme.cab

1 Comments:

At 2:10 PM, Blogger Unknown said...

Sir,
Good feature to use while it is required to transfer big files over the wire. Could you tell me how to make the file to normal form ? i meand unzipping.

 

Post a Comment

<< Home