Has Windows 7 Fixed the 255 Character File Path Li

2019-01-06 09:50发布

问题:

As I understand it, the limitation of 255 characters in a file path is a Windows limitation. What is the reasoning for this? If so, has this been resolved in Windows 7?

In our continuous integration practices, we often have deeply nested project structures and it would be extremely useful to be able to go beyond 255 characters. Right now we are somewhat forced to structure our projects in such a way as to not hit this artificial ceiling.

回答1:

See http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx

This explains that Unicode versions of Windows APIs have higher limits, and how to enable that.



回答2:

You can get around that limit by using subst if you need to.



回答3:

Workarounds are not solutions, therefore the answer is "No".

Still looking for workarounds, here are possible solutions: http://support.code42.com/CrashPlan/Latest/Troubleshooting/Windows_File_Paths_Longer_Than_255_Characters



回答4:

@Cort3z: if the problem is still present, this hotfix: https://support.microsoft.com/en-us/kb/2891362 should solve it (from win7 sp1 to 8.1)



回答5:

From Windows 10 version 1607, the limitation has been removed by setting a registry key

https://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx?f=255&MSPPError=-2147217396#maxpath