Created
December 27, 2019 04:34
-
-
Save icirellik/5e6db3dfc5b58a7fa6c4b3a64c8dc687 to your computer and use it in GitHub Desktop.
Windows Powershell Zip + Hash Utilities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Recusively Unzip 7-zip files in place | |
$7zipPath = "$env:ProgramFiles\7-Zip\7z.exe" | |
if (-not (Test-Path -Path $7zipPath -PathType Leaf)) { | |
throw "7 zip file '$7zipPath' not found" | |
} | |
Set-Alias 7zip $7zipPath | |
Get-ChildItem -Recurse *.z | %{ 7zip e $_.FullName "-o$($_.Directory)"} | |
# Recursively hash all files ands save the output to a file. | |
gci -File -rec | Get-FileHash > C:\file-hashes.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment