Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does MAX_PATH issue still exists in Windows 10

Can someone please tell us/me if the MAX_PATH issue still exists in (the technical preview of) Windows 10. And if it exists: How many characters can a path and an individual file name have?

like image 825
dkeck Avatar asked Dec 28 '14 21:12

dkeck


People also ask

Is Windows long path support enabled?

Navigate to Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem. Double click Enable NTFS long paths. Select Enabled, then click OK.

What is the longest file path in Windows 10?

In editions of Windows before Windows 10 version 1607, the maximum length for a path is MAX_PATH, which is defined as 260 characters. In later versions of Windows, changing a registry key or using the Group Policy tool is required to remove the limit.

What is Windows MAX_PATH?

In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character.


1 Answers

The issue will be always present in Windows, to keep compatibility with old software. Use the NT-style name syntax "\\?\D:\very long path" to workaround this issue.

In Windows 10 (Version 1607 - Anniversary Update) and Windows Server 2016 you seem to have an option to ignore the MAX_PATH issue by overriding a group policy entry enable NTFS long paths under Computer Configuration -> Admin Templates -> System -> FileSystem:

enter image description here

enter image description here

The applications must have an entry longPathAware similar to DPIAware in the application manifest.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >   <asmv3:application>     <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">       <longPathAware>true</longPathAware>     </asmv3:windowsSettings>   </asmv3:application> </assembly> 
like image 121
magicandre1981 Avatar answered Oct 25 '22 20:10

magicandre1981