我有以下结构文件夹zipzip1, zip2, zip3
我想将zip1, zip2, zip3中包含的所有文件解压到一个文件夹中。
我尝试了扩展-存档,但无法超出zip文件夹。
如果结构如下:
/Folder/
/Foo.zip
/1.zip
/2.zip
那么最简单的方法是:
Expand-Archive -LiteralPath 'c:folderFoo.zip' -DestinationPath 'C:tempFoo-expanded'
# Get all the nested zip files, and expand them to the same folder:
Get-ChildItem 'C:folderexpanded*.zip' |
Expand-Archive -DestinationPath 'C:folderSingleFolder'
如果您想覆盖现有的文件,请使用Expand-Archive -Force
。