{"id":945,"date":"2016-03-16T18:17:18","date_gmt":"2016-03-16T22:17:18","guid":{"rendered":"http:\/\/www.joshho.com\/blog\/?p=945"},"modified":"2016-03-16T18:19:47","modified_gmt":"2016-03-16T22:19:47","slug":"update-to-quick-one-liner-windows-unzips","status":"publish","type":"post","link":"https:\/\/www.joshho.com\/blog\/2016\/03\/16\/update-to-quick-one-liner-windows-unzips\/","title":{"rendered":"Update to quick one-liner Windows unzips"},"content":{"rendered":"<p>So this one is taken from <a href=\"https:\/\/blogs.msdn.microsoft.com\/daiken\/2007\/02\/12\/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget\/\">https:\/\/blogs.msdn.microsoft.com\/daiken\/2007\/02\/12\/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget\/<\/a><br \/>\n<code><br \/>\necho $zipfilename=$args[0]; $destination=$args[1];if(test-path($zipfilename)) {$shellApplication = new-object -com shell.application;$zipPackage = $shellApplication.NameSpace($zipfilename);$destinationFolder = $shellApplication.NameSpace($destination); $destinationFolder.CopyHere($zipPackage.Items()); };&gt;unzip.ps1<\/p>\n<p>powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File unzip.ps1 %FullPathToZip% %FullPathToTarget%<br \/>\n<\/code><\/p>\n<p>This was tested on PSv2.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So this one is taken from <a href=\"https:\/\/blogs.msdn.microsoft.com\/daiken\/2007\/02\/12\/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget\/\">https:\/\/blogs.msdn.microsoft.com\/daiken\/2007\/02\/12\/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget\/<\/a><br \/>\n<code><br \/>\necho $zipfilename=$args[0]; $destination=$args[1];if(test-path($zipfilename)) {$shellApplication = new-object -com shell.application;$zipPackage = $shellApplication.NameSpace($zipfilename);$destinationFolder = $shellApplication.NameSpace($destination); $destinationFolder.CopyHere($zipPackage.Items()); };&gt;unzip.ps1<\/p>\n<p>powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File unzip.ps1 %FullPathToZip% %FullPathToTarget%<br \/>\n<\/code><\/p>\n<p>This was tested on PSv2.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[27],"tags":[79,80,77,62,78,81,70],"_links":{"self":[{"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/posts\/945"}],"collection":[{"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/comments?post=945"}],"version-history":[{"count":0,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/posts\/945\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/media?parent=945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/categories?post=945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshho.com\/blog\/wp-json\/wp\/v2\/tags?post=945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}