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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -