7

I need to enable long paths but my Win 11 Home edition does not have the group policy editor. Is there a way to enable this from the command line or install group policy editor on my machine?

4
  • Life is easier, faster, more secure and better with shorter paths.
    – anon
    Commented Sep 9, 2023 at 18:29
  • Agreed! But not helpful.
    – A__
    Commented Sep 9, 2023 at 18:32
  • Long file / folder names were implemented in Windows 95 in 1995 27 years ago. I survived within that limit since that time. There no practical necessity to alter Windows to do different.
    – anon
    Commented Sep 9, 2023 at 19:40
  • 2
    It's not a matter of survival, it's a matter of making things a little easier. Anyway, I'm working on a Unity project that requires a plugin that must go in %USERPROFILE%\ProjectName\UnityProj\Assets\Plugins\PluginName\. This is a totally reasonable file structure but unfortunately the plugin at PluginName has its own extensive internal directory tree that I cannot alter without doing serious surgery on the plugin architecture itself. Enabling long paths is simply the path of least resistance (or so I thought).
    – A__
    Commented Sep 11, 2023 at 16:19

1 Answer 1

8

The proper way to enable long paths in Windows is documented here

It can be implemented by dropping the following into a .reg file and running it if you aren't comfortable editing the registry directly.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001

The real problem 90% of the time is going to be getting applications to support it and not the file system. Programmers hardcode MAX_PATH (260 chars) into their code and have been doing so for many many years.

It is lazy programming rather than using the windows heap to store the path names.

Some applications are written well enough to get around this but you will find more that don't work than do.

Good luck! :)

4
  • Thanks for the extra info. I want to also add that Windows may complain about paths being too long when copying files into a destination, but may not complain about the same files when moving them into the same destination.
    – A__
    Commented Sep 11, 2023 at 16:24
  • 2
    What little support Explorer has for long paths (e.g. navigation, copying, moving, deleting files) is not changed by the LongPathsEnabled setting. Setting LongPathsEnabled=1 will allow you to work with long paths at the command line, without having to use the special \\?\ prefix, but it does nothing for Explorer.
    – LesFerch
    Commented Dec 11, 2023 at 16:45
  • Lazy programmers like those at Microsoft? File Explorer still doesn't support long file paths. Microsoft need to be leading the way here. File Explorer and the built-in shell are the only things with file path limitations that I run into day to day.
    – TomWardrop
    Commented Jul 15 at 22:11
  • @TomWardrop, Your comment implies that Microsoft was lazy in choosing this path. The reason that explorer doesn't support this feature is because it's architecture and process space are shared out to 3rd parties via shell extensions. The explorer PROBABLY supports long paths and is disabled internally. Yeah.. its a bummer but what can ya do? :) Commented Jul 15 at 23:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .