Microsoft ends the 260 long path limit (sort of)

Martin Brinkmann
May 27, 2016
Updated • Jul 17, 2017
Windows
|
55

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
Microsoft ends the 260 long path limit (sort of)
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
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Sheeraz Junejo said on April 6, 2020 at 2:32 pm
    Reply

    This does not work from command line or from an installed app like SourceTree. It still complains, I have tried both RegEdit or GPEdit.!

  2. Mohammad said on August 9, 2019 at 12:35 am
    Reply

    Hi Mr Adam, on any version and Edition of Windows 10, you can gpedit. But, you’ll need to follow my outlined steps in this link below. Just copy and past this link and click expand all replies, and go to (a cooperator)
    https://answers.microsoft.com/en-us/windows/forum/all/how-to-enable-gpeditmsc-in-windows-10-home/9f2ab0da-3821-48e6-9205-fd7755b904f4?page=10

    However, though I was able to add gpedit, what I was intending to achieve(below) from adding it is not found there.

    When navigating the path “Local Computer Policy > Computer Configuration > Administrative Templates > System > “, I didn’t find “> Filesystem > NTFS.”

  3. Dilshan said on July 6, 2018 at 1:52 pm
    Reply

    Hey, Guys, this feature does not work for me. I did the same steps the author asked to do. Do you guys have some workaround for avoiding long file name issue in windows? Because I am still not allowed to have file name exceed 260 characters in windows 10.

    1. Adam said on July 8, 2019 at 7:12 pm
      Reply

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

      I am currently in the same position, now i’m trying to download the “latest Fast Ring Windows 10 Insider Build” and well see how it goes from there…

  4. George Renee said on March 11, 2018 at 8:35 pm
    Reply

    Hey guys I was confused as to which way to go!
    Robocopy or long path tool or GS Richcopy? Since many people are suggesting here to use these software so I thought to try all 3. After trying I found that GS Richcopy 360 works the best and 2nd comes robocpy because it lacks GUI and its transfer speed is not upto the mark with richcopy 360. I would now suggest you guys to go with GS Richcopy 360 although its paid, but cost is nothing in front of its performance.

  5. Mangesh said on August 24, 2017 at 11:40 am
    Reply

    how to Enable NTFS Long Path on server 2012R2

    1. Anonymous said on August 24, 2017 at 2:31 pm
      Reply
      1. Anonymous said on July 30, 2018 at 3:35 pm
        Reply

        Is there any answer for that? It really cannot be solved in windows server 2012 R2 ?

      2. Jean-François said on July 30, 2018 at 7:01 pm
        Reply

        As I stated in my previous post on June 8 2016 above, all versions of Windows since XP/2003 do have APIs supporting long paths up to 64KB. This is why Robocopy can do it. And any application (like my own) using the right APIs can do it.
        The documented method to avoid the 260-bytes API limit is to prefix your paths with the “\\?\” string. Not too difficult to use!
        This is documented there: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation
        The registry setting introduced in Windows 10/2016 only allows to get the same result without that “\\?\” prefix string.

        I’ve also successfully used that “\\?\” method in Python 2.7 scripts: Python itself does not use “\\?\” prefixes, and by default it fails to process paths longer than 260 bytes on versions of Windows < 10/2016 with the registry trick. But if the Python script itself inserts that "\\?\" prefix before calling Python APIs, it works with paths up to 64KB. Even in Windows 7. (I've not tested XP, but it should work as well.)

  6. Corey Lean said on August 18, 2017 at 7:31 pm
    Reply

    That’s not the exact solution which they have released. I am still unable to perform actions on these files. I thought of cutting short the names but then what about the deeply nested files. My friend suggested me to use GS Richcopy 360 which now has solved my problem, no more errors while transferring files or backup. Thanks to GS Richcopy 360.

  7. Mia lee said on May 19, 2017 at 10:22 pm
    Reply

    I am using Windows 10 but I dont think they have solved this problem. It still persists. After 255 characters name of file you cant perform actions on it. I don’t know why but thats the frustrating case. To solve this I used GS RichCopy. Try it its good and provides multi threaded file transfer, email notifications and what not. Maybe it could helped you, helps me everytime!

  8. mohammad said on May 7, 2017 at 12:58 pm
    Reply

    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.
    Also, no no entry ‘”\ System\CurrentControlSet\Policies” under the following key: “HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{48981759-12F2-42A6-A048-028B3973495F}Machine\
    Does any body know what else we can do?

  9. Ankish Karm said on April 20, 2017 at 8:44 pm
    Reply

    I dont know if this problem is fixed in win 10 or not but I have been using GS RichCopy to solve this problem since the time when it actually existed for me, in windows 7. From that time and still now I use this. It is a paid software but who cares of the money when software is a life saver. Try it, it never disappoints me!

  10. Aaron said on January 24, 2017 at 7:49 pm
    Reply

    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?

  11. PPRU said on November 16, 2016 at 1:09 pm
    Reply

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

  12. Mohammad said on October 20, 2016 at 1:03 am
    Reply

    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?

  13. Mohammad said on September 10, 2016 at 1:29 am
    Reply

    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”

  14. Mic said on September 9, 2016 at 1:47 pm
    Reply

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

  15. MHL said on September 9, 2016 at 12:06 pm
    Reply

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

  16. Mohammad said on September 6, 2016 at 12:31 am
    Reply

    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.

    1. Stan said on October 19, 2016 at 3:13 am
      Reply

      It was spam and thus probably deleted.

      1. mohammad said on October 20, 2016 at 1:17 am
        Reply

        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?

      2. Mohammad said on October 20, 2016 at 12:42 am
        Reply

        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.

  17. Mic said on August 29, 2016 at 10:13 am
    Reply

    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.

    1. Patrick Outhier said on September 9, 2016 at 6:11 am
      Reply

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

    2. Toolmaniac said on August 30, 2016 at 10:13 pm
      Reply

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

  18. Moices said on August 8, 2016 at 11:23 pm
    Reply

    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

    1. Mohammad said on August 11, 2016 at 11:33 pm
      Reply

      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

      1. Stan said on October 19, 2016 at 3:12 am
        Reply

        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.

      2. Claudio said on August 21, 2016 at 6:53 pm
        Reply

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

    2. Mohammad said on August 11, 2016 at 12:15 am
      Reply

      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.

  19. Martin said on July 19, 2016 at 11:57 pm
    Reply

    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 :(

  20. Mohammad said on July 9, 2016 at 6:37 pm
    Reply

    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???

  21. Jean-François said on June 8, 2016 at 10:47 am
    Reply

    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.

    1. Stan said on October 19, 2016 at 3:09 am
      Reply

      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.

  22. Adithya FRK said on May 28, 2016 at 11:13 am
    Reply

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

  23. Rick said on May 28, 2016 at 7:56 am
    Reply

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

  24. Cygnif said on May 28, 2016 at 2:27 am
    Reply

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

  25. Dave said on May 27, 2016 at 10:45 pm
    Reply

    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.

  26. CHEF-KOCH said on May 27, 2016 at 9:54 pm
    Reply

    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.

  27. Shawn said on May 27, 2016 at 9:01 pm
    Reply

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

  28. Croatoan said on May 27, 2016 at 8:18 pm
    Reply

    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.

  29. rocki said on May 27, 2016 at 7:24 pm
    Reply

    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.

    1. Tim said on May 27, 2016 at 8:35 pm
      Reply

      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.

      1. angry windows fan said on May 30, 2016 at 1:03 pm
        Reply

        @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.

      2. SrED said on May 8, 2020 at 11:18 pm
        Reply

        I wonder how these comments have aged in the year 2020…

      3. George said on May 28, 2016 at 2:53 pm
        Reply

        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).

      4. Corky said on May 28, 2016 at 1:34 pm
        Reply

        @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.

      5. John in Mtl said on May 28, 2016 at 12:54 pm
        Reply

        @ 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”.

      6. George said on May 28, 2016 at 11:38 am
        Reply

        @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.

      7. John in Mtl said on May 27, 2016 at 10:47 pm
        Reply

        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!

      8. Tony said on May 27, 2016 at 9:35 pm
        Reply

        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.

  30. george said on May 27, 2016 at 7:10 pm
    Reply

    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?

    1. BesserWisser said on May 30, 2016 at 1:59 pm
      Reply

      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. Solidstate said on May 28, 2016 at 10:03 pm
      Reply

      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.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.