cygpath and unc paths

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Dec 9 11:46:06 GMT 2024


On Dec  6 13:23, Federico Kircheis via Cygwin wrote:
> Hello,
> 
> was it considered to add a flag to cygpath to output a path in unc format?

No.  But it wouldn't be much work.

> 
> 
> For example, the folder
> 
> C:\test.
> 
> cannot be accessed from many Windows applications (powershell and cmd
> included) because of the trailing dot, while cygwin has no issue creating,
> accessing and deleting such files/folders.
> 
> Using an unc path
> 
> \\?\C:\test.
> 
> solves the issue for some programs, but cygpath currently misses an option
> for creating such path.

As a workaround you can just prepend the long path prefix:

  echo -n '\\?\'; cygpath ...

> Notice that creating a dos path leads to an error.

I don't understand. Creating which DOS path with which application?


Corinna


More information about the Cygwin mailing list