Powershell解压ZIP文件


这个命令居然只能用在Powershell5.0:

#requires -Version 5


$Source = 'C:\somezipfile.zip'
$Destination = 'C:\somefolder'
$Overwrite = $true
$ShowDestinationFolder = $true

Expand-Archive -Path $Source -DestinationPath $Destination -Force:$Overwrite

if ($ShowDestinationFolder) 
{
  explorer.exe $Destination
}

原文地址: Unzipping ZIP Files

本文链接: https://www.pstips.net/unzipping-zip-files.html
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注