Change sorting of Get-ChildItem -Recurse, it currently tears content appart
> Get-ChildItem -Name -Recurse -Directory
... currently tears directories appart because it FIRST iterates through a directory and THEN iterates through its childen recursively (I added blank lines to the output here to emphasize the issue):
I believe this kind of sorting doesn't make much sense.
I couldn't think of any use case to deal with some parent information item without processing its children and then, after other parent information items have been dealt with (probably even relying on a thorough processing of the first parent item) process the first item's children "afterwards".
Please change the iteration algorithm to iterate through an item's children FIRST (recursively) and THEN to move on to the next sibling in the directory.
If you believe this could be a regression issue, you might also add an optional Boolean switch parameter to switch between the two different iteration schemes:
-Recurse [ Eager | Lazy ]