Investment

Windows Long Path Limit: Why 260 Characters Still Haunts You

Windows Long Path Limit: Why 260 Characters Still Haunts You

"The file name(s) would be too long for the destination folder." If you've ever seen that dialog, you know the sinking feeling of realizing your file paths have become too unwieldy for Windows to handle. The operating system has technically supported longer paths for roughly a decade now. But as testing on Windows 11 25H2 revealed, simply enabling that support doesn't always solve the problem.

The LongPathsEnabled registry value exists specifically to remove the 260-character path limit. Yet File Explorer, the tool most people use every day for managing files and folders, continues to block operations that exceed it—even after you flip the switch. Here's why that happens and what you can actually do about it.

The 260-character limit explained

Most users never think about path lengths until something breaks. The 260-character ceiling isn't just about the file name itself. It covers the entire path from the drive letter through every folder, including the backslashes between them. On a typical Desktop with nested folders, characters add up fast.

Drive letters count as three characters (like C:\). Folder names and subfolders add their lengths. Each backslash counts as one. By the time you've created several layers of deeply named folders, you're closer to the limit than you might expect. The error message points at the file name, making it seem like renaming one folder will fix things. It rarely does, because the real problem is the accumulated length of everything above it.

How LongPathsEnabled works

The fix Microsoft built into Windows lives in the registry. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem and you'll find LongPathsEnabled set to 0 by default. Change that to 1, restart your PC, and Windows should allow applications to work with paths that exceed 260 characters.

The critical detail is what "should" means here. Microsoft removed the 260-character limit from several core Win32 file and directory functions starting with Windows 10 version 1607. However, applications must explicitly declare themselves capable of handling longer paths through something called a LongPathAware manifest. Without that declaration, apps continue operating under the old restrictions regardless of the registry setting.

Testing on Windows 11 25H2 (build 26200.9457) confirmed this behavior in practice. When LongPathsEnabled was set to 0, creating a folder with PowerShell at a 261-character path failed. After enabling the setting and performing a full restart, the exact same PowerShell command succeeded. File Explorer, meanwhile, still threw the same error at the same path.

Why File Explorer doesn't get the memo

The most likely explanation is that File Explorer's manifest doesn't include the LongPathAware declaration. Microsoft has never confirmed this outright, but it aligns with how the LongPathsEnabled setting is documented. The registry switch is an opt-in mechanism for developers who want their apps to use longer paths. File Explorer apparently hasn't opted in.

This creates a confusing situation for users. They enable the setting, restart their PCs, and expect everything to work. When File Explorer still fails, the error message offers no guidance toward the registry or any alternative. It simply tells users to shorten the file name or choose a location with a shorter path.

The opt-in design likely exists to maintain compatibility with older software. Forcing all applications to handle long paths could break programs written around the traditional limit. But the practical result is that the registry setting helps in some scenarios and does nothing in others, with no clear indication of which is which.

What this means for you

PowerShell and command-line tools benefit from the registry change if they're built with LongPathAware support. Many development tools, backup utilities, and archival programs also work correctly once the setting is enabled. File Explorer remains the weak link for most everyday file operations.

Say you need to extract a backup archive that contains folder structures from a Linux or macOS system. Those operating systems don't impose the 260-character limit, so the archived paths might be significantly longer than Windows expects. Enabling LongPaths lets PowerShell recreate the full structure without truncation. Dragging and dropping the same archive in File Explorer still fails unless you manually shorten paths first.

Third-party file managers often handle long paths without issues, making them a practical alternative for users who regularly work with deep directory structures. Developers, system administrators, and anyone managing archived data from mixed platforms will find this particularly relevant.

What to watch next

There's no public roadmap for when or if File Explorer will gain LongPathAware status. Microsoft could address this in a future Windows update, but there's no guarantee. For now, the registry trick remains the best built-in solution for command-line workflows, while File Explorer users still need to watch their path lengths.

Key takeaways

  • LongPathsEnabled at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem removes the 260-character limit for compatible apps
  • File Explorer doesn't support long paths even with the registry setting enabled
  • PowerShell 5.1 and many development tools respond correctly to LongPathsEnabled
  • A full system restart is required after changing the registry value
  • Third-party file managers often handle long paths where File Explorer fails

Frequently asked questions

Does changing LongPathsEnabled require a restart?

Yes, a full system restart is required because Windows reads the registry value per process rather than per application launch.

Can I use long paths in File Explorer after enabling LongPathsEnabled?

No, File Explorer currently does not support long paths even when LongPathsEnabled is set to 1.

Which apps support long paths on Windows?

PowerShell 5.1 and many development tools include LongPathAware manifests. Check individual app documentation for specific support information.

Does this limitation affect Windows 10 as well?

Yes, the LongPathsEnabled registry setting has been available since Windows 10 version 1607, and the same File Explorer limitation applies.

Are there alternatives to File Explorer that support long paths?

Yes, several third-party file managers handle long paths without issues, and they can serve as practical workarounds for users who frequently encounter this limitation.

Source & credits. This article was originally published by www.makeuseof.com. All images belong to the original publisher. Content and images remain © their respective owners and are shared here for informational, non-commercial purposes with full attribution.

Related