展开

适用范围:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012

展开一个或多个压缩文件。 你还可以使用此命令从分发磁盘检索压缩文件。

The expand command can also run from the Windows Recovery Console, using different parameters. 有关详细信息,请参阅 Windows 恢复环境 (WinRE)

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 重命名展开的文件。
指定要展开的文件。 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 ?).
目标 指定文件展开的位置。

If source consists of multiple files and you don't specify -r, the destination must be a directory that already exists. Destination can consist of a drive letter and colon, a directory name, a file name, or a combination of these. 目标 file \| path 规范。

-i 重命名展开的文件,但忽略目录结构。
-d 显示源位置中的文件列表。 不展开或解压缩文件。
-f:<files> 指定压缩包 (.cab) 文件中要展开的文件。 You can use wildcards (* or ?).
/? 在命令提示符下显示帮助。