大网数据广告活动
Windows排障命令

expand

· 52CE 我爱测

Reference article for the expand command, which expands one or more compressed files.

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

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

The expand command can also run from the Windows Recovery Console, using different parameters. For more information, see Windows Recovery Environment (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 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 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. Destination file | path specification.
-i Renames expanded files but ignores the directory structure.
-d Displays a list of files in the source location. Doesn't expand or extract the files.
-f:<files> Specifies the files in a cabinet (.cab) file that you want to expand. You can use wildcards (* or ?).
/? Displays help at the command prompt.

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 11/01/2022
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。