Powershell .CopyHere if it already exists work around
Posted
by Bruce227
on Stack Overflow
See other posts from Stack Overflow
or by Bruce227
Published on 2010-03-01T21:57:34Z
Indexed on
2010/05/10
7:04 UTC
Read the original article
Hit count: 327
powershell
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
© Stack Overflow or respective owner