Name
File Expansion Utility —
\windows\system32\expand.exe
Synopsis
Extract
one or more compressed
files from a cabinet (.cab
) file.
To Open
Command Prompt →
expand
Usage
expand -dsource
.cab [-f:files
] expand [-r]source
.cab [destination
] expand [-r]source
.cab [destination
] expandsource
.cab -f:files
destination
Description
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:
-
source.cab
The name of the cabinet (
.cab
) file from which to extract the files.-
destination
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).-
-d
Display (list) the contents of the specified cabinet file.
-
-r
Specify
-r
(recursive) withoutdestination
to extract all the files contained in the specified cabinet file. For example:expand -r package.cab
Specify
-r
along withdestination
to rename the files according to the file specification included indestination
. For example, the following extracts all the files inpackage.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 ...
Get Windows XP in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.