# Extract.exe: Extract Cabinet

This command-line tool extracts individual files from compressed cabinet (.cab) files. Using cabinet files is a highly efficient method of compression and distribution that has been used by Microsoft for many years. It is now available to anyone who needs to compress and distribute multiple files.

The cabinet file format is a nonproprietary format based on Lempel-Ziv compression. At the heart of this format is the MakeCAB compression tool, a loss-less data compression tool included with Windows 2000 that provides efficient compression for setup programs and Internet applications. By using MakeCAB, you can store multiple files in a single cabinet file and carry compression across files.

Note

- Using Windows 2000 and Windows 98 with Microsoft Internet Explorer 4 or later, you can use Windows Explorer to view and extract files from .cab files. Extract, though, is still useful for working with .cab files from the command line.

File Required

- Extract.exe

Extract.exe Topics

- Extract Syntax
- Extract Examples

top

## Extract.exe Syntax

extract cabinet [filename ...] [/a] [{/d | /e}] [/l dir] [/y]

- or -

extract source {[newname] | destination /c} [/y]

Where:

cabinet
  is the name of a cabinet file containing two or more files.
filename
  is the name of the file to extract from the cabinet. You can use wildcard characters and multiple file names separated by blanks.
source
  is the name of a compressed file (a cabinet containing only one file).
newname
  is a new file name given to the file extracted from source. If a new name is not supplied, the original name is used.
destination
  is the path in which to copy source. If the destination is not supplied, the original path is used. Used only with the /c switch.
/a
  processes all cabinets and follows the cabinet chain starting in the first cabinet mentioned.
/c
  copies the source file to the path destination (can be used for copying from DMF disks).
/d
  displays the directory of the cabinet file. Use /d with the cabinet file name to avoid extracting the files.
/e
  extracts all files from cabinet. Use /e instead of *.* to extract all files.
/l dir
  extracts files to the location dir. The default is the current directory.
/y
  does not prompt before overwriting an existing file.

top

## Extract.exe Examples

### Displaying the Contents of a .cab File

When you type:

`C:\Cconnect\Client>extract cconnect.cab /d`

you get the following information returned:

    Microsoft (R) Cabinet Extraction Tool - Version 5.00.2090.1
    Copyright (C) Microsoft Corp. 1981-1999.

     Cabinet cconnect.cab

    08-17-1999  6:04:48p A---       118,784 CConnect.exe
    06-27-1999  8:00:00p A---     1,384,448 msvbvm60.dll
    06-27-1999  8:00:00p A---       606,480 oleaut32.dll
    06-27-1999  8:00:00p A---       164,112 olepro32.dll
    06-27-1999  8:00:00p A---       147,728 asycfilt.dll
    06-27-1999  8:00:00p A---        16,896 stdole2.tlb
    05-31-1998 12:00:00a A---        22,288 COMCAT.DLL
    06-27-1999  8:00:00p A---        73,776 wshom.ocx
    06-27-1999  8:00:00p A---        61,491 wbemdisp.tlb
    03-26-1999 12:00:00a A---       118,784 MSSTDFMT.DLL
    03-26-1999 12:00:00a A---       249,856 SETUP1.EXE
    03-26-1999 12:00:00a A---       101,888 VB6STKIT.DLL
    03-26-1999 12:00:00a A---        73,216 ST6UNST.EXE
                    13 Files      3,139,747 bytes

### Moving a .cab File to Another Folder

When you type:

`C:\Cconnect\Client>extract cconnect.cab c:\cconnect /c`

you get the following information returned:

    Microsoft (R) Cabinet Extraction Tool - Version 5.00.2090.1
    Copyright (C) Microsoft Corp. 1981-1999.
    Extracting cconnect.cab -> c:\cconnect\cconnect.cab

### Extracting the Contents of a .cab to Another Folder

When you type:

    C:\Cconnect\Client>extract cconnect.cab /e /l c:\cconnect\temp
    you get the following information returned:
    Microsoft (R) Cabinet Extraction Tool - Version 5.00.2090.1
    Copyright (C) Microsoft Corp. 1981-1999.

     Cabinet cconnect.cab

    Extracting c:\cconnect\temp\CConnect.exe
    Extracting c:\cconnect\temp\msvbvm60.dll
    Extracting c:\cconnect\temp\oleaut32.dll
    Extracting c:\cconnect\temp\olepro32.dll
    Extracting c:\cconnect\temp\asycfilt.dll
    Extracting c:\cconnect\temp\stdole2.tlb
    Extracting c:\cconnect\temp\COMCAT.DLL
    Extracting c:\cconnect\temp\wshom.ocx
    Extracting c:\cconnect\temp\wbemdisp.tlb
    Extracting c:\cconnect\temp\MSSTDFMT.DLL
    Extracting c:\cconnect\temp\SETUP1.EXE
    Extracting c:\cconnect\temp\VB6STKIT.DLL
    Extracting c:\cconnect\temp\ST6UNST.EXE

### Extracting Two Files from a .cab to Another Folder

When you type:

    C:\Cconnect\Client>extract cconnect.cab cconnect.exe setup1.exe /l c:\cconnect\temp
    you get the following information returned:
    Microsoft (R) Cabinet Extraction Tool - Version 5.00.2090.1
    Copyright (C) Microsoft Corp. 1981-1999.

     Cabinet cconnect.cab

    Extracting c:\cconnect\temp\CConnect.exe
    Extracting c:\cconnect\temp\SETUP1.EXE