Expand command in Windows

The expand command expands one or more compressed files. You can use this command to retrieve compressed files from distribution drives.

Applies to : Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.

The expand command expands one or more compressed files. You can use this command to retrieve compressed files from distribution drives.

Expand command syntax

 expand [/r] expand /r [] expand /i [] expand /d .cab [/f:] expand .cab /f: 

Parameters

Parameters Description / r Rename the expanded files. source Specifies the file to expand. Source can include drive letters and colons, directory names, file names or combinations of these names. You can use wildcards ( * or ? ). destination Specifies where the file will be expanded.
If the source includes multiple files and you do not specify the / r parameter , the destination must be a directory.
Destination can include drive letter and colon, directory name, file name or combination of these names.
Destination file | Describe the path. / i Rename the expanded files but ignore the directory structure.
This parameter applies to: Windows Server 2008 R2 and Windows 7. / d Displays the list of files in the source location. Do not expand or extract files. / f: Specify the files in a cabinet file (.cab) that you want to expand. You can use wildcards (* or ? ). /? Show help at the command prompt.

Note

  1. Use the expand command at Recovery Console.
  2. The expand command , with different parameters, is available from the Recovery Console. For more information on Recovery Console, please refer to the article: Installing and using the Recovery Console.

See more:

  1. Endlocal command in Windows
  2. Exit command in Windows
  3. Eventquery command in Windows
4.3 ★ | 4 Vote