Microsoft ends the 260 long path limit (sort of)

Microsoft added a new feature to the most recent preview version of its Windows 10 operating system that resolves one of the longest standing issues that users experienced when using Windows: the 260 character limit.

The system that Windows uses by default has a limit of 260 characters which led to all kinds of issues including the inability to run operations on files stored under paths exceeding the limit, issues with the extraction of files, and issues with transferring files from systems that have no such limit.

Up until now all you could do was reduce the path to regain access to files, or use programs such as Long Path Fixer to resolve issues that you are experiencing.

Enable NTFS Long Path

ntfs long path

The latest Windows 10 Insider Preview ships with a new policy that does away with the 260 character limit, at least somewhat.

Its description reads:

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.

The caveat here is the term "manifested win32 applications". While most win32 applications since the days of Windows Vista are manifested, it is usually the case that the applications need to declare capabilities explicitly.

It seems likely that applications need to explicitly declare support for the feature before they can make use of it.

A quick test on a system after enabling the feature seems to confirm this. Still, getting that option is a step in the right direction especially if Microsoft implements support for it in File Explorer and other core Windows applications that could benefit from it.

How to enable support for long paths using the Group Policy Editor

Please note that the feature is currently only available as part of the latest Fast Ring Windows 10 Insider Build.

It seems likely that Microsoft will make it available with the Anniversary Update that it plans to release this Summer.

  1. Tap on the Windows-key, type gpedit.msc, and hit enter.
  2. Confirm the UAC prompt if it appears.
  3. Use the hierarchy on the left to navigate to the following policy: Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem > NTFS.
  4. Locate the Enable NTFS long paths policy and double-click on it.
  5. Switch its state to enabled.
  6. Click ok.

Using the Registry instead

You can enable the policy in the Registry directly as well.

  1. Tap on the Windows-key, type regedit.exe and hit enter.
  2. Confirm the UAC prompt.
  3. Navigate to the following key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{48981759-12F2-42A6-A048-028B3973495F}Machine\System\CurrentControlSet\Policies
  4. Check if the key LongPathsEnabled exists.
  5. If it does not exist, right-click on Policies and select New > Dword (32-bit) Value from the menu.
  6. Name it LongPathsEnabled.
  7. Set its value to 1 to enable the feature.
Summary
Article Name
Microsoft ends the 260 long path limit (sort of)
Description
The most recent version of Windows 10 and Windows 2016 Server ship with a new policy to enable long paths support for applications.
Author
Publisher
Ghacks Technology News
Logo
Please share this article

Facebooktwittergoogle_plusredditlinkedinmail



Responses to Microsoft ends the 260 long path limit (sort of)

  1. george May 27, 2016 at 7:10 pm #

    after very long years Microsoft decided to fix this!

    win32 applications? how about 64 bit applications? and the windows explorer? is it only for applications?

    • Solidstate May 28, 2016 at 10:03 pm #

      Win32 is a set of APIs that are used to make what's commonly referred to as "desktop" programs. It has nothing to do with whether a program is inherently 32-bit or 64-bit.

    • BesserWisser May 30, 2016 at 1:59 pm #

      As Solidstate stated it has nothing to do with 32 bit or 64 bit. As far as I know, it is solely a limitation of the win32 API.
      NTFS per se is capable of handling long paths, has no limitations on characters in files names, etc.
      According to "File System Forensic Analysis" by Brian Carrier the $FILE_NAME attribute has a field namespace which can have the following values:
      0 - Posix: name is case sensitive, all Unicode characters allowed except "/" and NULL
      1 - Win32: the well-known limitations
      2 - DOS: 8.3 length limitation, no special/unicode characters, upper case
      3 - Win32 & DOS: used when original file name fits in the DOS namespace
      So only the namespace selected by OS (API) / application when storing a file on a NTFS filesystem determines the limitations enforced.
      NTFS itself is remarkable flexible and has little if any limitations regarding files names / path lengths.

  2. rocki May 27, 2016 at 7:24 pm #

    wow, finally a bona-fide reason to upgrade from windows 7. martin can you find someone to backport this feature to windows 7? i'll send cash.

    • Tim May 27, 2016 at 8:35 pm #

      Unless you have a specific reason not to upgrade such as compatibility issues, you're only putting off the inevitable anyway. Windows 7 has been out of mainstream support for over a year now and in just over 3.5 years it'll be out of extended support too.

      • Tony May 27, 2016 at 9:35 pm #

        I think the reason that most people have not upgraded to Windows 10 is because of all the privacy issues and that Microsoft forces updates for the most popular versions. This is compounded by the fact that Microsoft has taken up the abhorrent practice of inserting marketing and advertising into their operating systems.

        Because of these serious issues, Windows 7, supported or not, will likely be the mainstream operating system for at least half a decade, perhaps longer.

      • John in Mtl May 27, 2016 at 10:47 pm #

        Yep but it still ***works flawlessly*** around here, there's no telemetry or "MSpyware" because those KB's are not necessary so not installed. 2020 is a long ways off.

        And I agree with Tony. I absolutely hate advertising - I stopped listening to radio & TV years ago because of this. Over the years since win95 all the way up to win7, I've used tons of different arrangements to counteract advertising on my computing platforms; and now with windows 10, to see them advert directly on my desktop?? NEVER!

        My Linux skills are coming along very nicely, thank you!

      • George May 28, 2016 at 11:38 am #

        @John in Mtl, you are overreacting. I've been using W10 for a long time (almost since its release) and not once did I ever see a "desktop advertisement". Classic Shell is all you need (and ShutUp10 or W10Privacy for the privacy issues, which are also overblown - not saying the don't exist). Windows 7 was great when released and still is, but apart from being a slower OS, it lacks a lot of the nice new features and optimisations of 8.1/10.

      • John in Mtl May 28, 2016 at 12:54 pm #

        @ Georges, I do have systems here that run win8.1 and I gave win10 Enterprise an honest 90 day spin. Since I'm a "desktop" guy and to me computers are mostly a "tool for a purpose", the 1st thing I did was configure so the OS would display the traditional desktop instead of the tiles. Of course, in the traditional desktop view there are no adverts.

        My reaction about them being pushed to the machine has more to do with the fact that as a society, just about everything nowadays has to be, or is, monetized. Wherever you go, there are fewer and fewer places where you are not assaulted with a "get this", "buy that", "on sale", "best product", etc. message. Its bad enough that the TVs & radios blurts this constant stream of nonsense 24hrs a day, every 8-10 minutes; but now, regular folks (for whom the computer is almost just an "entertainment center") who use those newer metro-type interfaces see another one of their daily tools or "appliance" hiijacked by all those benevolent corporations that "have something that might interest you", "try to help you", "have something you can't live without", etc. you get the idea.

        We've gone from being a market economy to being a market society - not the kind of place I want to live in or participate in full-time. Yes, life is more than all that and you can choose to ignore all this and set sights on another way of life, but you're still clobbered by the incessant and sometimes subtle influence of marketing everywhere you go. In the words of Pink Floyd: "Welcome my son, welcome to the machine. It's all right, we told you what to dream".

      • Corky May 28, 2016 at 1:34 pm #

        @George, If anything you're under-reacting, you'd have to be myopic to not be able to see the direction Microsoft is taking Windows, a direction where the end-user has absolutely no say other than to not use it.

      • George May 28, 2016 at 2:53 pm #

        I see what you mean and in principle, I agree. I don't like Microsoft's new direction either. But... the advantages of the new OS still outweigh the disadvantages for me. It is faster, more lightweight, pleasant to use and quite customizable. And you *can* avoid most -if not all- of the new privacy issues. Don't forget that these privacy issues exist not only in other OSes too (W7 too, if you are not careful or use 3rd-party solutions there, too), but in many programs as well (especially security/antivirus suites etc. but not limited to that). I totally understand the need to stick with W7 in order to put some sort of "pressure" into MS to take back some questionable decisions, but I just don't think it's worth it - not yet, anyway. Remember, it *is* an old OS and in pure computing terms, it shows its age. Every time I tried it (after the release of W10 that is), I wanted to get back to the newer OS asap (I don't have a super-PC but it's not a drag either).

        In short, I am not willing to sacrifice my privacy either (that's why I take all available measures which I believe are enough, without getting paranoid) but I won't use an OS I don't like either (Linux cannot replace Windows, at least for what I do) and OSX is too limited (and it has its own privacy issues, too).

      • angry windows fan May 30, 2016 at 1:03 pm #

        @george
        Sure you've been using W10 for a while now and bricked some of the default settings and workings of the OS.
        But if you read all the upgrade notes and roadmap, you'll soon read between the lines that MS is working on that very hard.
        It won't go so far as implementing it straight away because they still need the user base firm in their grasp.
        But even in W10 there is already an update that facilitates advertisement in the start menu. iexplore MSN tiles .... are since years ads suppliers.
        forced updates with no user consent possible.
        They have allready shown us that they are not to be trusted on there word.
        Add that all up and you know why W10 is bed for you.
        Sure they need to have honey to lure the users.

  3. Croatoan May 27, 2016 at 8:18 pm #

    It's nice feature. I use folder and descriptive file names for fast search with Everything. Few times I hit error long path limit. I am interested does Word, PowerPoint and Explorer support this.

  4. Shawn May 27, 2016 at 9:01 pm #

    Hell I want this for batch files for really long DOS commands that's where I really need it.

  5. CHEF-KOCH May 27, 2016 at 9:54 pm #

    Anyone know if this means ReFS is now default in usage, I know it can be used in Server editions but I always wondered why it was not activated for normal users. From the Wikipedia page I can read that there are not really benefits: https://en.wikipedia.org/wiki/ReFS#Stability_and_known_issues

    I never tried it myself so I can't say much about it, but besides the limit I see no reason to skip ntfs4. I think an entirely new file system would be good but I not expect much because that would require a massive re-write and new permission system.

  6. Dave May 27, 2016 at 10:45 pm #

    Finally a use for external manifest files (other than a DPI fix). Martin, you could do a follow-up post on the topic of using external manifest files. Seems like it just became very relevant for Windows 10.

  7. Cygnif May 28, 2016 at 2:27 am #

    Hope they fixed the registry editor long filename crashes also. And why isn't this fix enabled by default?

  8. Rick May 28, 2016 at 7:56 am #

    What quick test? Like you say, even File Explorer doesn't support it. What apparently on-hand program does?

  9. Adithya FRK May 28, 2016 at 11:13 am #

    Been facing this with 7 zip. Is there any way to fix this in windows 7

  10. Jean-Fran├žois June 8, 2016 at 10:47 am #

    I don't understand the point of this.
    There was indeed a 260 character limit for filesystem pathnames in the original WIN32 APIs, but Microsoft fixed it a LONG time ago with new "extended" WIN32 APIs. These have been available since Windows XP at least, and probably in Windows 2000 already.
    I've used the new APIs for all my system management tools, and they all work fine with paths up to 64K in all versions of windows.
    You can download these tools from https://github.com/JFLarvoire/SysToolsLib/releases if you want to give them a try. SysTools.zip contains many pathname management tools, like a which.exe tool for finding your own tools in the PATH, or update.exe for updating any kind of file or symbolic link, possibly in a deep tree. All of them support 64K paths, non-ASCII characters in any code page, etc.

    • Stan October 19, 2016 at 3:09 am #

      Jean, kudos but that only goes to show that not all devs have brains like you do since most are still using only the old limited APIs.

  11. Mohammad July 9, 2016 at 6:37 pm #

    Hi, I have installed Windows 10 Home 64-bit. However, when typing 'gpedit.msc', I didn't find anything listed to me. So, I think that this 'gpedit.msc' is not available in Windows 10 Home. Also, when I navigated to the following key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\", I didn't find any entity like "Group Policy Objects". I only found 'Group Policy'. However, when expanded the 'Group Policy', there is no entity like '"{48981759-12F2-42A6-A048-028B3973495F}Machine\System\CurrentControlSet\Policies" inside 'Group Policy'.

    How to use enable this feature???

  12. Martin July 19, 2016 at 11:57 pm #

    I have the same issue as Mohammad with the registry.

    I have W10 pro - so I DO have Group Policy Editor.

    But under the NTFS section, the Enable NTFS Long Paths setting is nowhere to be seen :(

  13. Moices August 8, 2016 at 11:23 pm #

    Go to the following Registry key:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Policies

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

    • Mohammad August 11, 2016 at 12:15 am #

      Thanks a lot, Moices.
      1- I was told that this feature LongPathsEnabled" is only available in Windows 10 Pro. So, you think it is worth a try to do what you suggested above?

      2- Also, You think this modification will not mess up the registry.

      3- Also, you meant that on the right side, I must click 'right click' to have options, and then create a new 32-bit DWORD value

      4- Besides, why when typing 'gpedit.msc', I didn't find anything listed to me. So, I think that this 'gpedit.msc' is not available in Windows 10 Home.

    • Mohammad August 11, 2016 at 11:33 pm #

      Moices, I have done your suggestions by
      "Go to the following Registry key:
      HKEY_LOCAL_MACHINE\System\CurrentControlSet\Policies

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

      However, when trying to move(copy a long file name), to another folder in an external hard disk, I found :
      The file name(s) would be too long for the destination folder. You can shorten the file name and ty again, or try a location that has shorter path

      • Claudio August 21, 2016 at 6:53 pm #

        hi.....i have win 10 pro 64 last build anniversary update.....same issue i've tried several ways but it doesn't work

      • Stan October 19, 2016 at 3:12 am #

        You don't seem to get it - this feature will help only with apps that specifically make use of it, and clearly File Explorer still doesn't and is stuck with the old 260 char limit.

        Also yes, the Group Policy Editor isn't available in Win10 Home as you managed to figure out.

  14. Mic August 29, 2016 at 10:13 am #

    Me too. In Group Policy Editor, the Enable NTFS long paths is missing and, although I added the 32-bit DWORD value in Windows Registry, I still see the windows telling me files are too long.

    • Toolmaniac August 30, 2016 at 10:13 pm #

      The same for me .... exactly . Is it the way to add missing "Enable MTFS Long Paths " in GPE ????

    • Patrick Outhier September 9, 2016 at 6:11 am #

      It was moved, its now called "Enable Win32 long paths" under "Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem"

  15. Mohammad September 6, 2016 at 12:31 am #

    Many of users have been faced with the same issue I've been faced with. But unfortunately the author of this article hadn't replied to either of us. Some other authors , like the one below, saying that long path tool solved their issues, although I don't know why his comment was only sent to my E-mail as a follow-up notification, and is not seen here in the comments.

    Author: johnraf
    Comment: I used to have similar problems too, but after using
    "long path tool" You can use to solve this problem.

    • Stan October 19, 2016 at 3:13 am #

      It was spam and thus probably deleted.

      • Mohammad October 20, 2016 at 12:42 am #

        Stan, thanks a lot,
        Even from you I have received one reply notification to my Email via followup comments notifications, however, it isn't being shown. Are your replies spam too?
        This is the reply received to my Email by you.
        Author: Stan
        Comment: Jean, kudos but that only goes to show that not all devs have brains like you do since most are still using only the old limited APIs.

      • mohammad October 20, 2016 at 1:17 am #

        To Stan reply on October 19, 2016 at 3:12 am
        You don't seem to get it - this feature will help only with apps that specifically make use of it, and clearly File Explorer still doesn't and is stuck with the old 260 char limit.
        Also yes, the Group Policy Editor isn't available in Win10 Home as you managed to figure out.

        Yes, I realized that Windows 10 Home doesn't have Group Policy Editor. However, Are you kidding with me when saying this feature of enabling long path will not work on the File Explorer, and File Explorer will still use the old 260 char limit.
        . Then what benefits are there from this article? This articles about how to enable the long path limit feature.
        The issue I am faced with while moving a file from one location to another is "The destination Path Too long: The file would be too long for the destination folder". Will "enable support for long paths using the Group Policy Editor" not be useful?

  16. MHL September 9, 2016 at 12:06 pm #

    Thanks Patrick, I'm going to check that out now

  17. Mic September 9, 2016 at 1:47 pm #

    @Patrick: i've found that option and enabled it, but nothing changed. :(

  18. Mohammad September 10, 2016 at 1:29 am #

    Thanks a lot, Patrick Outhier. When you said below, you meant in the Group Policy Editor
    which will be opened by typing gpedit.msc, and hit enter. If yes, then I'd be saying that 'Group Policy Editor' is not found in my system Windows 10 home 64. When typing gpedit.msc, and hit enter, there is no thing appears.

    "It was moved, its now called "Enable Win32 long paths" under "Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem"

  19. Mohammad October 20, 2016 at 1:03 am #

    To Stan reply on October 19, 2016 at 3:12 am
    You don't seem to get it - this feature will help only with apps that specifically make use of it, and clearly File Explorer still doesn't and is stuck with the old 260 char limit.
    Also yes, the Group Policy Editor isn't available in Win10 Home as you managed to figure out.

    Yes, I realized that Windows 10 Home doesn't have Group Policy Editor. However, Are you kidding with me when saying this feature of enabling long path will not work on the File Explorer, and File Explorer will still use the old 260 char limit.
    . Then what benefits are there from this article? This articles about how to enable the long path limit feature.
    The issue I am faced with while moving a file from one location to another is "The destination Path Too long: The file would be too long for the destination folder". Will "enable support for long paths using the Group Policy Editor" not be useful?

  20. PPRU November 16, 2016 at 1:09 pm #

    So, how do I get this to work an a 2012R2 Server?
    It worked fine on my Windows10 machine, but i cant release it...

  21. Aaron January 24, 2017 at 7:49 pm #

    I am having the same problem, no File system under Local Computer Policy > Computer Configuration > Administrative Templates > System > and obviously, no Enable Win32 long paths option.

    Does any body know what else we can do?

Leave a Reply