Expand

Extracts a file from a compressed file. Use this command to extract a driver file from a cabinet (.cab) or compressed file.

The expand command with the parameters listed below is only available when you are using the Recovery Console The expand command with different parameters is available from the command prompt.

expand source [/F:filespec}] [destination] [/d] [/y]

Parameters

source

Specifies the file to expand. Use this if the source file contains a single file. Source can consist of a drive letter and a colon, a directory name, a file name, or a combination. You cannot use wildcard characters.

/f:filespec

If the source contains more than one file, this specifies the name of the file you want to extract. You can use wildcards for the files you want to extract.

destination

Specifies both the destination directory and file name for the extracted file, or each individually.

/d

Lists the files contained in the cabinet file without expanding it or extracting from it.

/y

Suppresses the overwrite prompt when expanding or extracting files.

Examples

The following example extracts the file Msgame.sys from the Drivers cabinet file on a Setup CD and copies it to C:\Windows\System\Drivers:

expand d:\i386\driver.cab /f:msgame.sys c:\Windows\system\drivers

The following example expands the compressed file Access.cp_:

expand d:\i386\acces.cp_ c:\Windows\system32\access.cpl

The following example lists all the files in the Drivers cabinet file on the Setup CD:

expand /d d:\i386\driver.cab

 Important

The Driver cabinet file, which contains most of the drivers provided by Windows, includes thousands of files. Expanding all of the files from this cabinet file onto your hard disk will take time and a lot of disk space. It is recommended that you extract only the file you need from this file.

Note

If the destination is not specified, the file is copied to the current directory.

You cannot specify removable media such as a floppy disk drive or a CD-ROM as the destination.

Related Topics

Command-line reference A-Z

Recovery Console overview



© 2016 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies