expand

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

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

expand 命令还可以使用不同参数从 Windows 恢复控制台运行。 有关详细信息,请参阅 Windows 恢复环境 (WinRE)

语法

expand [-r] <source> <destination>
expand -r <source> [<destination>]
expand -i <source> [<destination>]
expand -d <source>.cab [-f:<files>]
expand <source>.cab -f:<files> <destination>

参数

参数 描述
-r 重命名展开的文件。
source 指定要展开的文件。 source 可以由驱动器号后跟分号、目录名称、文件名或是这几项的组合组成。 可以使用通配符(* 或 ?)。
destination 指定文件展开的位置。

如果 source 由多个文件组成,并且未指定 -r,则 destination 必须是已存在的目录。 destination 可以由驱动器号后跟分号、目录名称、文件名或是这几项的组合组成。 目标 file \| path 规范。

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