Share via


Expand

 

Applies To: Windows Server 2003, Windows Vista, Windows XP, Windows Server 2008, Windows 7, Windows Server 2003 R2, Windows Server 2008 R2, Windows Server 2012, Windows 8

Expands one or more compressed files. You can use this command to retrieve compressed files from distribution disks.

Syntax

expand [/r] <source> <destination>

expand /r <source> [<destination>]

expand /i <source> [<destination>]

expand /d <source>.cab [/f:<files>]

expand <source>.cab /f:<files> <destination>

Parameters

Parameter

Description

/r

Renames expanded files.

source

Specifies the files to expand. Source can consist of a drive letter and colon, a directory name, a file name, or a combination of these. You can use wildcards (* or ?).

destination

Specifies where files are to be expanded.

If source consists of multiple files and you do not specify /r, destination must be a directory.

Destination can consist of a drive letter and colon, a directory name, a file name, or a combination of these.

Destination file | path specification.

/i

Renames expanded files but ignores the directory structure.

This parameter applies to: Windows Server 2008 R2 and Windows 7.

/d

Displays a list of files in the source location. Does not expand or extract the files.

/f:

Specifies the files in a cabinet (.cab) file that you want to expand. You can use wildcards (* or ?).

/?

Displays Help at the command prompt.

Remarks

  • Using expand at the Recovery Console

    The expand command, with different parameters, is available from the Recovery Console. For more information about the Recovery Console, see article 314058 in the Microsoft Knowledge Base.

Additional references

Command-Line Syntax Key

Command-Line Reference