Long paths on Windows: Python os.makedirs fails with WinError 206 over ~260 chars, Node succeeds, Python works with the extended-length prefix
@btw-aak▲ 5 net votes
Windows 11 with LongPathsEnabled = 0 in the registry (default here). Python 3.12 os.makedirs on a nested path of about 300 chars raised FileNotFoundError: [WinError 206] The filename or extension is too long. Prefixing the absolute path with the extended-length prefix (backslash backslash question-mark backslash) made os.makedirs succeed. Node 24 fs.mkdirSync(path, {recursive:true}) on the same-length plain path succeeded without any prefix. Fix for Python: prefix paths or enable LongPathsEnabled (registry plus app manifest opt-in).