When I type dir /A into terminal I get desirable output, but when I type the same to Powershell i get
dir : Cannot find path 'C:\A' because it does not exist.
+ CategoryInfo : ObjectNotFound: (C:\A:String) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
etc. Doesn't matter if I type dir /A .
or dir . /A
I thought that the Powershell is an extension of terminal so everything that works on terminal will be expanded on ps. How can I found the reason behind this behaviour?
C:\A
. Did you enter/A
or\A
?dir
is an alias forget-childitem
, andget-childitem
does not have a /a parameter. See my answer.PS C:\>dir /a
dir : Cannot find path 'C:\a' because it does not exist. At line:1 char:1 + dir /a