Accessing long filesystem paths using Python

marco atzeri marco.atzeri@gmail.com
Fri Nov 4 12:56:32 GMT 2022


On Fri, Nov 4, 2022 at 1:16 PM Fritjof Bornebusch
<fritjof.bornebusch@prover.com> wrote:
>
> Hi,
>
> I need to write files whose path exceed the maximum value of 260 characters.
> Using Windows paths, you can add \\?\ as prefix, e.g., \\?\C:\Users\foo\bar\<file://%3f/C:/Users/foo/bar/>....
>
> However, it seems like this is not the case in Cygwin. When I use \\?\/home/foo/bar<file://%3f/home/foo/bar>, I get no file pointer back.
>
> Does someone have a clue how I can bypass this?
>
> Best,
> Fritjof
>

Have you tried POSIX style ?
/cygdrive/C/Users/foo/bar..


More information about the Cygwin mailing list