docs
docs copied to clipboard
Legacy DOS device path resolution information incorrect on Windows 11 machine
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
Thank you for reporting this. I verified that this is a change in Win11 as Win10 operates as documented.