Skip to content

Instantly share code, notes, and snippets.

@thinsoldier
Created January 14, 2022 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinsoldier/12d8fdcbdf4a344bd6002d858fb37ee7 to your computer and use it in GitHub Desktop.
Save thinsoldier/12d8fdcbdf4a344bd6002d858fb37ee7 to your computer and use it in GitHub Desktop.
Windows Powershell Extract zip files to the same location with same folder name (removed .zip)
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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment