HOME > Archive系コマンドレット > Expand-Archive
Expand-Archive
Expand-Archiveは、zip形式ファイルを解凍するコマンドです。
エイリアスなし
解説
zip形式ファイルを解凍する時に使用します。
構文
- (構文)
- Expand-Archive [-Path] <string> [[-DestinationPath] <string>] [<CommonParameters>] Expand-Archive [[-DestinationPath] <string>] [<CommonParameters>]
パラメータ | 説明 |
---|---|
-Path パス | 対象パスを指定する(ワイルドカード使用可) (例)-Path "D:\test*" |
-LiteralPath パス | 対象パスを指定する(ワイルドカード使用不可) (例)-LiteralPath "D:\test" |
-DestinationPath パス | 解凍先のパスを指定する |
-Force | 強制的に実行する |
-WhatIf | 実行はせずに実行結果の確認のみ行う |
-Confirm | 実行前に確認メッセージの表示を行う |
共通的なパラメータは「共通パラメータ」をご覧ください。
サンプル
C:\test.zipをC:\hogeに解凍する
Expand-Archive -Path C:\test.zip -DestinationPath C:\hoge
解凍前に確認メッセージを表示する
Expand-Archive -Path C:\test.zip -DestinationPath C:\hoge -Confirm
コマンドのヘルプを表示する
Get-Help Expand-Archive
備考
- パラメータ名の「-Path」、「-DestinationPath」は省略可能です。
関連項目
- Archive系コマンドレット
- Compress-Archive:zip形式で圧縮する
- Expand-Archive:zip形式ファイルを解凍する