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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -