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

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -