Boolean-and all incoming pipeline objects in powershell -


what convenient way 'and' pipeline, such returned value true iff every incoming object evaluated true? such as:

$filelist | % { test-path $_ } | boolean-and

the above snippet should testing every file in filelist exists. there no 'boolean-and' function. there different name/way this?

another possibility:

@($filelist | % { test-path $_ }) -notcontains $false  

as pipeline function:

function and-boolean  { $input -notcontains $false } 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -