Code: Select all
PS Z:\src\puzzles-20230801.0dd0186> dir .\keen.c .\unequal.c .\towers.c
Get-ChildItem : A positional parameter cannot be found that accepts argument '.\towers.c'.
At line:1 char:1
+ dir .\keen.c .\unequal.c .\towers.c
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
I was not expecting this. I've seen START refuse multiple arguments in this way, but I just assumed START was poorly implemented. I never expected DIR to refuse multiple arguments too! I suppose there must be a way to get DIR to list N named files in a directory, but this simple obvious and traditional way is not it. CMD.EXE's DIR accepts multiple arguments, it's just PowerShell's DIR which refuses them. Oh, I wonder, does PowerShell have a list syntax?