Why does the 260 character path length limit exist in Windows?

后端 未结 11 965
孤城傲影
孤城傲影 2020-11-22 03:18

I have come up against this problem a few times at inopportune moments:

  • Trying to work on open source Java projects with deep paths
  • Storing deep Fitne
11条回答
  •  礼貌的吻别
    2020-11-22 03:59

    As to how to cope with the path size limitation on Windows - using 7zip to pack (and unpack) your path-length sensitive files seems like a viable workaround. I've used it to transport several IDE installations (those Eclipse plugin paths, yikes!) and piles of autogenerated documentation and haven't had a single problem so far.

    Not really sure how it evades the 260 char limit set by Windows (from a technical PoV), but hey, it works!

    More details on their SourceForge page here:

    "NTFS can actually support pathnames up to 32,000 characters in length."

    7-zip also support such long names.

    But it's disabled in SFX code. Some users don't like long paths, since they don't understand how to work with them. That is why I have disabled it in SFX code.

    and release notes:

    9.32 alpha 2013-12-01

    • Improved support for file pathnames longer than 260 characters.

    4.44 beta 2007-01-20

    • 7-Zip now supports file pathnames longer than 260 characters.

    IMPORTANT NOTE: For this to work properly, you'll need to specify the destination path in the 7zip "Extract" dialog directly, rather than dragging & dropping the files into the intended folder. Otherwise the "Temp" folder will be used as an interim cache and you'll bounce into the same 260 char limitation once Windows Explorer starts moving the files to their "final resting place". See the replies to this question for more information.

提交回复
热议问题