[alternative syntax]
For some people, directional pipe operators are not their taste, but they rather prefer chaining. See some interesting opinions on this topic shared in roslyn issue tracker: dotnet/roslyn#5445.
Based on the case and the context, one of this approach can be considered implicit (or indirect). For example, in this case using pipe against enumerable requires special token $_
(aka PowerShell's "THIS" token
) might appear distasteful to some.
For such fellas, here is a more concise, straight-forward way of doing it with dot chaining:
(gci . -re -fi *.txt).FullName
(<rant> Note that PowerShell's command arguments parser accepts the partial parameter names. So in addition to -recursive
; -recursiv
, -recursi
, -recurs
, -recur
, -recu
, -rec
and -re
are accepted, but unfortunately not -r
.. which is the only correct choice that makes sense with single -
character (if we go by POSIXy UNIXy conventions)! </rant>)