Sometimes its just so hard to do the simple things with Windows, like unzip files without a 3rd party DLL. After banging my head on this for a couple of hours I finally figured out a way to do it using Windows PowerShell and the Windows XP ZIP explorer extensions through the Shell32 COM interface.
function UnzipFile([string] $zipFile, [string] $destinationFolder){ if(test-path($zipFile)) { $shell = new-object -com Shell.Application $srcFolder = $shell.NameSpace($zipFile) $destFolder = $shell.NameSpace($destinationFolder) $items = $srcFolder.Items() $destFolder.CopyHere($items); } }
Powered by: newtelligence dasBlog 2.1.8102.813
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Shawn Neal
E-mail