The topic line says it all. I would also like to do this with pipes.
I decided that I could use Get-ChildItem, Measure-Object and Where-Object, but Measure-Object does not like dates.
Should I have a script block that moves through each element returned from Get-ChildItem, and does the comparison perform to find out if this is the last? I thought that for this there should be a convenient PS cmdlet.
source
share