Skip to content

Get-ChildItem c: throws an error. #7032

Description

@sethvs

When using Get-ChildItem with drive name without a backslash, i.e. c: the error is thrown.

Steps to reproduce

Get-ChildItem c:

Expected behavior

Lists the content of current directory on the specified drive.

Actual behavior

Get-ChildItem : Cannot find path 'C:\C:\' because it does not exist.
At line:1 char:1
+ Get-ChildItem c:
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (C:\C:\:String) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.1.0-preview.701
PSEdition                      Core
GitCommitId                    v6.1.0-preview.701
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Cmdletsgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions