function - Unzip with powershell does not work -
here code :
$e = "d:\users\myname\desktop\folder\ghjkl.zip" $f = "d:\users\myname\desktop\folder\zipfiles" function expand-zipfile($file, $destination) { $files = (get-childitem $file).fullname $shell = new-object -com shell.application $files | %{ $zip = $shell.namespace($_) foreach ($item in $zip.items()) { $shell.namespace($destination).copyhere($item) } } } expand-zipfile $e $f
it returns no error there nothing in "zipfiles" folder
what wrong ?
thanks
finally,
i've changed .rar .zip testing code.
file corrupted, script stopped when unzip asked
thanks answers
Comments
Post a Comment