Advertisement

How to enable NTFS Long Paths in Windows 10

In Windows 10 Anniversary Update, Microsoft finally addressed a long-standing issue that developers faced while doing development - the 260 character limitation for path length. This path length limitation was present in Windows for almost an eternity. In case you don't know, in all currently released Windows versions, the maximal length of the file path is 260 chars. Starting with build 14352 of Windows 10, which is part of the Anniversary Update (version 1607), this limitation can be bypassed.

Advertisеment

File Explorer Windows 10 folder optionsAll Windows file systems have a concept of files and folders to access stored data. A path is a string value that indicates where that data is stored. However, there is a limitation of 260 characters for the path imposed by Windows, which includes the drive letter, colon, separating backslashes and a terminating null character. This is not a limitation of the NTFS file system but of the legacy APIs that are used to access data. There are also workarounds like accessing the Unicode (or "wide") versions of the Windows API functions, and also by prefixing the path with \\?\.

At the end user level, some users might have already faced the issue in the past, when File Explorer doesn't allow access to a file or a folder, if the path to it exceeds 260 chars. In such a situation, the user has no other solution but to either use symbolic links to access that data or a third party tool which uses workarounds. For example, the alternative file management tool, Total Commander can help you access such files and folders, since it is able to work with long paths out of the box.

However, the Explorer Shell still has had this limitation in Windows for years. To resolve this issue, Microsoft has made the appropriate changes in Windows 10. A new Group Policy setting, available starting with Windows 10 build 14352, will allow the operating system to have paths longer than 260 chars:

Enabling NTFS long paths will allow manifested Win32 applications and Windows Store applications to access paths beyond the normal 260 char limit per node. Enabling this setting will cause the long paths to be accessible within the process.

This actually means that an application has to have the following line in its manifest:

<longPathAware>true</longPathAware>

A manifest is a small file that contains additional information about the process EXE such as compatibility information and DPI-awareness etc.

Besides the app developer adding the manifest, the appropriate Group Policy setting should be enabled. This can be done using Group Policy Editor or by using a Registry tweak.

How to enable NTFS Long Paths in Windows 10 using Group Policy

  1. Press Win + R keys together on your keyboard and type:
    gpedit.msc

    Press Enter.Windows 10 run gpedit

  2. Group Policy Editor will open. Go to Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem -> NTFS.
  3. There, double click and enable the option Enable NTFS long paths.group policy
  4. Restart Windows 10.

How to enable NTFS Long Paths in Windows 10 using a Group Policy tweak

  1. Open Registry Editor.
  2. Go to the following Registry key:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Policies

    Tip: You can access the desired Registry key with one click.
    If you don't have such a key, then just create it.

  3. On the right side, create a new 32-bit DWORD value named LongPathsEnabled. Set its value data to 1.registry
    Note: Even if you are running 64-bit Windows, you still need to create a 32-bit DWORD value. See the following screenshot:
  4. Restart Windows 10.

Finally, there is a way to enable this new feature without using Group Policy. It requires the following tweak.

How to enable NTFS Long Paths in Windows 10 using a Registry tweak

  1. Open Registry Editor.
  2. Go to the following Registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

    Tip: You can access the desired Registry key with one click.
    If you don't have such a key, then just create it.

  3. On the right side, create a new 32-bit DWORD value named LongPathsEnabled. Set its value data to 1.
  4. Restart Windows 10.

You are done.

See the following video:

You can subscribe to our YouTube channel here: Youtube.

That's it. This feature looks very interesting, since it finally addresses one of the pain points of working with Windows. It looks like for Windows 8.1 and Windows 7, this problem was fixed in 2013 by hotfix KB2891362. However, if there are additional fixes for this in Windows 10 Anniversary Update, it would be nice if Microsoft ported these changes to Windows 8.1 and Windows 7 too.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Advertisеment

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

8 thoughts on “How to enable NTFS Long Paths in Windows 10”

  1. Lo he probado y NO FUNCIONA. He habilitado la directiva, he reiniciado y sigue apareciendo el mismo error. Á partir de la profundidad de carpeta 16 no se pueden crear más carpetas. Los nombres de archivo largo no se pueden copiar hasta determinada profundidad de carpeta.

    I tried and DOES NOT WORK. I have enabled the policy, I rebooted and still see the same error. From the depth of folder 16 you can not create more folders. Long file names can not be copied to the folder specified depth.

    1. 1. The application should support it via manifest.
      2. Make sure you have the latest build installed.

      1. Check this: https://msdn.microsoft.com/library/windows/desktop/aa365247.aspx#maxpath
        The LongPathEnabled exists in another directive on Regedit so is not needed to create a new one in the path that you mentioned in the post.

        1. I see. At the moment of writing, they have expressed only the Group Policy option. I will add the new key to the article.
          Thank you!

  2. I have the latest edition of Win 10 anniversary with all the latest updates and it does not have the choice in the group policy – my computer is in a workgroup. I checked with a colleague who is also running WIn 10 anniversary but his is in a 2012 R2 domain. He doesn’t see that option in the group policy on his local computer.

  3. reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem” /v LongPathsEnabled /t REG_DWORD /d 0x1 /f

  4. I’m utterly confused as not one of these proposals fixes the issue.

    1) gpedit.msc: Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem -> NTFS — there is no such entry called “Enable NTFS long paths” in my system.

    2) regedit: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Policies — created a new 32-bit DWORD value named LongPathsEnabled and I set its value data to 1. Restarted Win 10. Still getting error that “filenames are too large” when I attempt to copy a huge folder from C: to D:

    3) regedit: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem — 32-bit DWORD value named LongPathsEnabled & set its value data to 1 – restarted – still getting the “file too long” error

    I’m at the point of giving up, I’m extremely frustrated that Microsoft is this insubordinate

    If anyone has figured out how to fix this, please email me!

Leave a Reply

Your email address will not be published.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.