• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
File Expansion Utility \windows\system32\expand.exe

Extract one or more compressed files from a cabinet (.cab) file.

To Open

Command Prompt expand


expand -d source.cab [-f:files]
expand [-r] source.cab [destination]
expand source.cab -f:files 


A cabinet file is a compressed archive commonly used to package application installation files. The File Expansion Utility is used to extract files embedded in these cabinet files and takes the following options:


The name of the cabinet (.cab) file from which to extract the files.


The name of the folder in which to place the extracted files, a new filename to use for the extracted files, or a combination of the two. If using the -f option, destination is mandatory and must include a filename (with or without wildcards).


Display (list) the contents of the specified cabinet file.


Specify -r (recursive) without destination to extract all the files contained in the specified cabinet file. For example:

expand -r package.cab

Specify -r along with destination to rename the files according to the file specification included in destination. For example, the following extracts all the files in package.cab and renames their file extensions to .txt:

expand -r package.cab *.txt

-f :files

Use the -f option to specify one or more files to extract; use this if you don’t want to extract all the files from the cabinet file. For example, the following extracts the file uno.txt from package.cab:

expand package.cab -f:uno.txt uno.txt

Note that the destination parameter is mandatory when using the -f option and is used to specify the target filename. In this example, as well as most times this program will be used, files and destination will be the same.


The easiest method for extracting files from cabinets is to simply double-click the .cab file in Explorer and then drag the desired file(s) out. Since expand.exe is a command-line program, it is better suited for use with WSH scripts and batch files. It can also be used when installing or repairing Windows XP when Explorer isn’t available.

See Also

“Cabinet (CAB) Maker”, “System Configuration Utility”

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint