powershell - 从另一个 zip 存档中提取压缩文件
问题描述
我正在使用 powershell 5.1.17134.590,想知道是否有办法从另一个 zip 中提取压缩文件,而无需先复制到另一个文件夹,请
像这样的东西,唯一的提取将来自 file.zip 内容:
Expand-Archive -LiteralPath arquive.zip\file.zip -DestinationPath c:\somefolder
解决方案
Microsoft.PowerShell.Archive 似乎无法做到这一点,它似乎仅限于基本级别的压缩/解压缩 - https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell。存档/?view=powershell-6
我发现有人使用 System.IO.Compression.FileSystem 来实现这个目标的几个帖子:
https://techibee.com/powershell/reading-zip-file-contents-without-extraction-using-powershell/2152
推荐阅读
- php - SELECT * FROM table WHERE name LIKE "'.search_variable.' “不起作用
- javascript - Form.io 自定义布局组件
- python - 复制列表更改原始列表(python)?
- sql - sql多次计数
- docker - 向工件添加新的密钥库会破坏现有的 https 连接
- c++ - 按方案排序矩阵
- r - 盒子状态值(颜色)可以在 Shinydashboard 中是反应性的和有条件的吗?
- docker - Docker CentOS - 添加 EPEL
- javascript - Rails webpacker OpenLayers。未捕获的 ReferenceError:未定义 ol。已修复但未解决
- swift - 无法将“Int”类型的值转换为预期的参数类型“Bool”