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 可以包含磁碟機代號和冒號、目錄名稱、檔名或這些的組合。 您可以使用萬用字元 (*?)。
目的地 指定要展開檔案的位置。

如果來源是由多個檔案所組成,而且未指定 -r,則目的地必須是已經存在的目錄。 Destination 可以包含磁碟機代號和冒號、目錄名稱、檔名或這些的組合。 目的地 file \| path 規格。

-i 重新命名展開的檔案,但忽略目錄結構。
-d 顯示來源位置中的檔案清單。 不會展開或擷取檔案。
-f:<files> 指定封包 (CAB) 檔案中要展開的檔案。 您可以使用萬用字元 (*?)。
/? 在命令提示字元顯示說明。