powershell - Powershell - 解压缩 7z 文件
问题描述
我在使用 Powershell 解压缩 7z 文件时遇到问题,尽管这里有很多需要的信息: unzip file using 7z in powershell
当我使用相同的方法时:
$7zipPath = "$env:ProgramFiles\7-Zip\7z.exe"
Set-Alias 7zip $7zipPath
$ZipFilePath = "C:\Users\lpiech\Documents\Lukasz\PowerShell\Test\20200113.7z"
$DestinationUzipPath = "C:\Users\lpiech\Documents\Lukasz\PowerShell\Test\"
7zip x -o$DestinationUzipPath $ZipFilePath -r;
我得到这个答案ResultsScreen 但在目的地我没有任何文件在“测试”文件夹中并且脚本没有完成它停止我“运行”模式。我应该怎么做才能获得解压缩的文件?
解决方案
为什么人们喜欢以艰难的方式做事?
$env:path += ';C:\Program Files\7-Zip'
7zip x -oDocuments\Lukasz\PowerShell\Test Documents\Lukasz\PowerShell\Test\20200113.7z -r
推荐阅读
- substrate - make: *** 没有规则使目标“init”。停止
- python - 在 DB2 中触发 - 尝试填充 XML 列时出错
- python - 快速排序 Python 程序
- php - GRAV CMS TNTSearch 标题页覆盖
- javascript - React 中数组的条件渲染:For vs Map
- blazor - Blazor - 导航到不同的页面
- java - 子类化自定义 ImageView 的问题
- python - 如何使用蓝牙批处理脚本自动配对 RPi 和 Android
- sql - 在 postgres 中标准化 JSON 中的出生日期
- postman - 如何使用 Postman 在下载时自动打开文件?