Skip to content

Instantly share code, notes, and snippets.

@thinsoldier
Created January 14, 2022 20:08
Show Gist options
  • Select an option

  • Save thinsoldier/12d8fdcbdf4a344bd6002d858fb37ee7 to your computer and use it in GitHub Desktop.

Select an option

Save thinsoldier/12d8fdcbdf4a344bd6002d858fb37ee7 to your computer and use it in GitHub Desktop.

Revisions

  1. thinsoldier created this gist Jan 14, 2022.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    https://social.technet.microsoft.com/Forums/en-US/ee897671-fa3a-4e06-8cb6-0986900c032e/powershell-function-unzip-all-files-in-a-folder?forum=winserverpowershell
    user rex02

    #Extract zip files to the same location with same folder name (removed .zip)

    gci -Recurse -Filter *.zip |ForEach-Object {$n=($_.Fullname.trimend('.zip')); Expand-Archive -Path $_.Fullname -DestinationPath $n -Force}