tags:

views:

168

answers:

2

Hi,

I run the following to unzip and want to over write the current files if they exist but the microsoft solution found here(http://msdn.microsoft.com/en-us/library/ms723207%28VS.85%29.aspx) doesn't seem to work. I haven't found anything that says it works so is there a work around to select the 'yes to all' option?

$zipPackage = (new-object -com shell.application).NameSpace($zipfilename)

$destinationFolder = (new-object -com shell.application).NameSpace($destination)

$destinationFolder.CopyHere($zipPackage.Items(),16)

Thanks

A: 

My pragmatic remedy for this issue would be to use something like 7-Zip. Which has a nice commandline interface easily used from within PowerShell.

Bas Bossink
Sorry, I can't change the zip app. So is there no way around the microsoft blunder?
Bruce227
A: 

Your example works for me on Vista with Posh 2.0..

icnivad