In certain circumstances I can see that this would\could be useful but the
overhead of maintaining it I think is too high. It would also mean that each
step in the pipeline had to complete its processing before passing data along
otherwise subsequent cmdlets wouldn't have an accurate count. This could be
a severe performance hit
--
Richard Siddaway
All scripts are supplied "as is" and with no warranty
PowerShell MVP
Blog:
http://richardsiddaway.spaces.live.com/
PowerShell User Group:
http://www.get-psuguk.org.uk
"RickB" wrote:
| Quote: |  | |
|
> On Apr 9, 10:23 am, MichaelL <goo...@xxxxxx> wrote: | Quote: |  | | |
> > A while back I posted a suggestion on to MS Connect regarding the
> > possible addition of a special variable to numerically signify how far
> > through an iteration of input items a pipeline current is.
> >
> > https://connect.microsoft.com/feedba...x?FeedbackID=2...
> >
> > Has any thought been given to implementing this?
> >
> > In summary I'm lobbying for the addition a new variable (such as $%),
> > similar to $_, that will would be an integer value holding a count of
> > the number of items that a pipeline has processed.
> >
> > It would be really useful to have such a simple means of determining
> > how far though a pipeline you are.
> >
> > Michael Lewis | | | | | >
> I can't see the page you refer to but I also don't see how knowing
> the number of records already processed (which your function can
> count itself pretty easily) can tell you how far along you are.
> Knowing how many are left would require that you somehow know how
> many objects will ultimately be processed. Such information is, in
> most cases I can think of, simply not available. It's like asking
> how many words I will type today. Moreover, this 'count' could be
> different at every step in the pipeline. Maintenance of all these
> counts represents an amount of overhead I'd just as soon not have
> every application I write saddled with. Especially when I can't
> think of even one practical use much less enough uses to consider
> that it might possibly be justifiable.
>
> | |
| | |