Skip to content

Legacy DOS device path resolution information incorrect on Windows 11 machine #41193

Closed
@mmashwani

Description

@mmashwani

Type of issue

Outdated article

Description

The following information about how legacy DOS device paths are parsed is inaccurate on the Windows 11 machine I tested it on.

#A path that begins with a legacy device name is always interpreted as a legacy device by the Path.GetFullPath(String) method. For example, the DOS device path for CON.TXT is \.\CON, and the DOS device path for COM1.TXT\file1.txt is \.\COM1.

I did the following test in PowerShell:

  • [System.IO.Path]::GetFullPath('CON.TXT') ==> C:\Users\{UserName}\CON.TXT
  • [System.IO.Path]::GetFullPath('COM1.TXT\file1.txt') ==> C:\Users\{UserName}\COM1.TXT\file1.txt

Page URL

https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats

Content source URL

https://github.com/dotnet/docs/blob/main/docs/standard/io/file-path-formats.md

Document Version Independent Id

716a28dc-360e-2964-47f5-0ff18bb00b1c

Article author

@adegeo

Metadata

  • ID: b74b99ff-32f8-c2d1-0a62-5907985f591e
  • Service: dotnet-fundamentals

Associated WorkItem - 275386

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.dotnet-fundamentals/svcin-prThis issue will be closed (fixed) by an active pull request.okr-qualityContent-quality KR: Concerns article defects (bugs), freshness, or build warnings.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions