怎么使用powershell解压一个压缩文件
2015-07-29 10:39
741 查看
#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
}
$Source = 'C:\somezipfile.zip'
$Destination = 'C:\somefolder'
$Overwrite = $true
$ShowDestinationFolder = $true
Expand-Archive -Path $Source -DestinationPath $Destination -Force:$Overwrite
if ($ShowDestinationFolder)
{
explorer.exe $Destination
}
相关文章推荐
- Python中zip()函数用法举例
- zip 的压缩原理与实现
- PowerShell移动目录中指定文件的方法(非全部文件)
- Powershell小技巧之创建短网址
- PowerShell实现查询打开某个文件的默认应用程序
- PowerShell设置文件只读、隐藏属性的方法
- Windows Powershell扩展类型系统
- PowerShell脚本源码输出到文件的最佳写法
- Windows Powershell 通过函数扩展别名
- PowerShell脚本实现创建桌面快捷方式的方法
- PowerShell重启服务命令Restart-Service详细介绍
- PowerShell中执行Javascript的方法示例
- 探索PowerShell(十三) WMI对象介绍
- Powershell小技巧之使用Copy-Item添加程序到开机启动
- Windows Powershell创建对象
- Windows Powershell 访问数组
- Powershell小技巧之使用WS-Man来调用PowerShell命令
- PowerShell在控制台输出特殊符号的方法
- Windows Powershell使用哈希表
- PowerShell实现的文件同步脚本分享