Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

getting the name of files being extracted

$
0
0

Hello all:

I have a script that is extracting files from a zipped file.  I am trying to display the name of the file as it is extracted.  Here is what I have:

foreach($item in $zip.items())
  {
   $shell.Namespace("E:\APPs\Folder").CopyHere($item, 0x14)
   Write-Host "File: " + $item + " copied"
  }

When I run this, I get the following:

File:  + System.__ComObject +  copied
File:  + System.__ComObject +  copied
File:  + System.__ComObject +  copied
File:  + System.__ComObject +  copied

How do I display the actual name and not type of the file?

Thanks,

jocasio



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>