Skip to content

When creating file using -Path c: without a backslash, file created in the drive root and not in the current folder. #7048

@sethvs

Description

@sethvs

Steps to reproduce

PS C:\Folder> New-Item -Path c: -Name testfile.txt

Expected behavior

File is created in the C:\Folder directory

Actual behavior

File is created in the root of the drive c:\

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.1.0-preview.705
PSEdition                      Core
GitCommitId                    v6.1.0-preview.705
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions