I want to extract all .zip files in a given directory in temp using powershell

前端 未结 3 1464
一生所求
一生所求 2020-12-19 02:26

I wrote the following code for extracting the .zip files to temp:

function Expand-ZIPFile($file, $destination)
{
    $shell = new-object -com shell.applicati         


        
3条回答
  •  佛祖请我去吃肉
    2020-12-19 03:24

    Get-ChildItem 'path to folder' -Filter *.zip | Expand-Archive -DestinationPath 'path to extract' -Force
    

    requires ps v5

提交回复
热议问题