Last active
February 26, 2016 15:17
-
-
Save Geertvdc/1f1a92181af88fd1fee8 to your computer and use it in GitHub Desktop.
Create a zip file from UWP appxPackage folder
This file contains 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
Param( | |
[string]$dir | |
) | |
function ZipFiles( $zipfilename, $sourcedir ) | |
{ | |
Add-Type -Assembly System.IO.Compression.FileSystem | |
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal | |
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcedir, | |
$zipfilename, $compressionLevel, $false) | |
} | |
$folderName = Get-ChildItem "$dir\AppxPackages\" | Select-Object -first 1 | |
Write-Host "creating zip of folder $dir\AppxPackages\" | |
ZipFiles "$($dir)\$($folderName.Name).zip" "$dir\AppxPackages\"; | |
Write-Host "created zip file with name $($dir)\$($folderName.Name).zip" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment