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:filesdestination
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
-foption,destinationis mandatory and must include a filename (with or without wildcards).-
-d Display (list) the contents of the specified cabinet file.
-
-r Specify
-r(recursive) withoutdestinationto extract all the files contained in the specified cabinet file. For example:expand -r package.cab
Specify
-ralong withdestinationto rename the files according to the file specification included indestination. For example, the following extracts all the files inpackage.caband renames their file extensions to.txt:expand -r package.cab *.txt
-
-f:files Use the
-foption 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access