How to extract CAB File using command line tools in Windows 10/8/7

In Windows environment, CAB refers to Cabinet files – an archive file format for Microsoft Windows. The format supports data compression and embedded digital certificates used for maintaining archive integrity. Using this file format, a user can store multiple files/folders into a single file with or without involving data compression in this archive.

Windows can unzip or extract the contents of a compressed file as it is natively compatible with CAB files. Moreover, the OS can create, extract, or rebuild cab files. This means you do not require any additional third-party software for this task. All CAB files can be unzipped using basic Windows command line tools.

There are three built-in Windows command line tools for dealing with CAB files:

  1. expand.exe
  2. makecab.exe
  3. extrac32.exe

expand.exe

To see the command line option available for expand.exe, open a Command Prompt window, type the following and hit Enter:

expand /?

extract cab files expand

makecab.exe

To see the command line option available for makecab.exe, open a Command Prompt window, type the following and hit Enter:

makecab.exe

extrac32

To see the command line option available for extrac32, open a Command Prompt window, type the following and hit Enter:

extrac32 |more

Extract CAB File using command line

To extract the contents of Cab files, you can use any of the above tools. Let us take the example of expand.exe tool.

To extract the contents of a .cab file, first change the directory to point to the location of the source using the CD command and then run the following command:

Expand TWC.cab -F:* C:\TWCFolder

extract CAB File using command line

Here you are extracting the contents of TWC.cab file into the C:\TWCFolder. -F is the number of files to expand. When you use ‘*’, it means all the files.

When completed, the tool will display the complete list of extracted files.

Close the command prompt windows and go to Windows Explorer. There, the complete list of full extracted file structure should be visible to you.

Incidentally, several free file compression software including 7-Zip, let you easily compress or extract the contents of a CAB file on a Windows system.

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.