powershell - Don't want some part information in output -


hi guys have following code search folder , return string containing value down:

filter multiselect-string( [string[]]$patterns ) {   # check current item against patterns.   foreach( $pattern in $patterns ) {     # if 1 of patterns not match, skip item.     $matched = @($_ | select-string -pattern $pattern)     if( -not $matched ) {       return     }   }    # if patterns matched, pass item through.   $_ }  get-childitem -recurse | multiselect-string 'report','product1' 

so if code gets file displays that:

directory: c:\users\sarvesh.nundram\desktop\pmi\rpd_extract_xml\sql_tobemigrated2\group1  mode                lastwritetime     length name ----                -------------     ------ ---- -a---        11/21/2013   1:07 pm     133279 acapulco 

what if don't want these info:

mode                lastwritetime     length name ----                -------------     ------ ---- -a---        11/21/2013   1:07 pm  

this?

get-childitem -recurse |          multiselect-string 'report','product1' |             select fullname # or select -expa fullname 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -