How to implement search text in zip-archive using powershell


$search = read-host "string:" [system.reflection.assembly]::loadwithpartialname("microsoft.system.environment") | out-null $machinename = [system.environment]::machinename $path = "\\$machinename\projects" set-location $path $dirs = get-childitem foreach ($dir in $dirs) {          get-childitem -path $path\$dir\traces -recurse -include *.trace  | where-object {(gc $_) | select-string $search}  } 


how organize search in zip file

how organize such search in archive, unpack , manually search not possible because zip archive huge amount (> 1000)

from original post, sounds want find text string inside lot of text files inside of zip package.

i don't know there's method of doing you're asking. think need follow process similar this:

  1. extract contents of zip package temporary location
  2. perform search
  3. clean temporary extraction path

hope helps.


if post helpful, please click little "vote helpful" button :)

trevor sullivan
trevor sullivan's tech room
twitter profile


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...